liuyg
2021-10-27 71891f73bdab2d994fe6d8f4ed4078e9972a28d9
导出数据
5 files modified
267 ■■■■ changed files
src/components/map/main.vue 4 ●●●● patch | view | raw | blame | history
src/views/onSiteInspection/company.vue 66 ●●●●● patch | view | raw | blame | history
src/views/onSiteInspection/securityStaff.vue 65 ●●●●● patch | view | raw | blame | history
src/views/qualificationExamination/qualificationExamination.vue 61 ●●●●● patch | view | raw | blame | history
src/views/qualificationExamination/scoreInquiry.vue 71 ●●●●● patch | view | raw | blame | history
src/components/map/main.vue
@@ -93,8 +93,8 @@
  },
  mounted() {
    //建立地图
    // this.createmap(1); //1为本地
    this.createmap(); //空或其他是外网
    this.createmap(1); //1为本地
    // this.createmap(); //空或其他是外网
    this.parentParameter();
src/views/onSiteInspection/company.vue
@@ -19,6 +19,7 @@
      @row-save="rowSave"
      @row-del="rowDel"
      @search-change="searchChange"
      :search.sync="query"
      @search-reset="searchReset"
      @selection-change="selectionChange"
      @current-change="currentChange"
@@ -213,34 +214,43 @@
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        //获取查询条件
        // console.log(this.userInfo, 456);
        // return;
        var data = {
          startTime: this.query.startTime,
          endTime: this.query.endTime,
          reviewedDeptName: this.query.reviewedDeptName,
          realName: this.query.realName,
          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/coinspect/export-coinspect?` + data);
      });
      })
        .then(() => {
          //获取查询条件
          // console.log(this.userInfo, 456);
          // return;
          var data = {
            startTime: this.query.startTime,
            endTime: this.query.endTime,
            reviewedDeptName: this.query.reviewedDeptName,
            realName: this.query.realName,
            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/coinspect/export-coinspect?` + data);
        })
        .catch((action) => {
          // this.$message({
          //   type: 'info',
          //   message: action === 'cancel'
          //     ? '放弃保存并离开页面'
          //     : '停留在当前页面'
          // })
        });
    },
    getStartTime() {
      if (
src/views/onSiteInspection/securityStaff.vue
@@ -323,34 +323,43 @@
        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);
      });
      })
        .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);
        })
        .catch((action) => {
          // this.$message({
          //   type: 'info',
          //   message: action === 'cancel'
          //     ? '放弃保存并离开页面'
          //     : '停留在当前页面'
          // })
        });
    },
    getStartTime() {
      if (
src/views/qualificationExamination/qualificationExamination.vue
@@ -27,6 +27,17 @@
      @on-load="onLoad"
      @sort-change="sortChange"
    >
      <!-- 自定义按钮 -->
      <template slot="menuLeft">
        <el-button
          type="warning"
          size="small"
          plain
          icon="el-icon-download"
          @click="handleExport"
          >导出
        </el-button>
      </template>
    </avue-crud>
  </basic-container>
</template>
@@ -43,6 +54,7 @@
import { datasing } from "./dataqualificationExamination";
// import { getList } from "@/api/qualificationExamination/qualificationExamination";
import { getListSecurity } from "@/api/system/user";
import Qs from "qs";
export default {
  data() {
@@ -303,7 +315,7 @@
    };
  },
  computed: {
    ...mapGetters(["permission"]),
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.post_add, false),
@@ -321,6 +333,53 @@
    },
  },
  methods: {
    //导出
    handleExport() {
      this.$confirm("是否导出审查信息?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          //获取查询条件
          // console.log(this.userInfo, 456);
          // console.log(this.query, 456);
          // return;
          var data = {
            cardid: this.query.cardid,
            realName: this.query.realName,
            securitynumber: this.query.securitynumber,
            status: this.query.status,
            endTime: this.query.endTime,
            startTime: this.query.startTime,
            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/blade-user/export-security?` + data);
        })
        .catch((action) => {
          // this.$message({
          //   type: 'info',
          //   message: action === 'cancel'
          //     ? '放弃保存并离开页面'
          //     : '停留在当前页面'
          // })
        });
    },
    getStartTime() {
      if (
        this.$route.query.startTime != undefined &&
src/views/qualificationExamination/scoreInquiry.vue
@@ -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>
@@ -42,7 +54,7 @@
import { datasing } from "./dataqualificationExamination";
// import { getList } from "@/api/qualificationExamination/qualificationExamination";
import { getLisperexamScore } from "@/api/qualificationExamination/scoreInquiry";
import Qs from "qs";
export default {
  data() {
    return {
@@ -208,6 +220,10 @@
            // slot: true,
            // display: false,
          },
          {
            label: "是否发证",
            prop: "isFazheng",
          },
        ],
      },
      data: [
@@ -223,7 +239,7 @@
    };
  },
  computed: {
    ...mapGetters(["permission"]),
    ...mapGetters(["permission", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.post_add, false),
@@ -241,6 +257,52 @@
    },
  },
  methods: {
    //导出
    handleExport() {
      this.$confirm("是否导出成绩信息?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          //获取查询条件
          // console.log(this.userInfo, 456);
          // console.log(this.query, 456);
          // return;
          var data = {
            startTime: this.query.startTime,
            endTime: this.query.endTime,
            qualified: this.query.qualified,
            examName: this.query.examName,
            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/examScore/export-examScore?` + data);
        })
        .catch((action) => {
          // this.$message({
          //   type: 'info',
          //   message: action === 'cancel'
          //     ? '放弃保存并离开页面'
          //     : '停留在当前页面'
          // })
        });
    },
    getStartTime() {
      if (
        this.$route.query.startTime != undefined &&
@@ -360,6 +422,11 @@
        this.page.total = data.total;
        this.data = data.records;
        for (var k in this.data) {
          if (this.data[k].qualified == 0) {
            this.data[k]["isFazheng"] = "已发证";
          } else {
            this.data[k]["isFazheng"] = "未发证";
          }
          for (var m in this.data[k]) {
            if (this.data[k][m] == -1) {
              this.data[k][m] = "";