Administrator
2021-08-21 14df83036ff529bcf8eae9c792b1b8f2a54efaf0
考试成绩查询修改
5 files modified
231 ■■■■■ changed files
src/views/exam/performance.vue 44 ●●●● patch | view | raw | blame | history
src/views/exam/singleperformance.vue 46 ●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 54 ●●●● patch | view | raw | blame | history
src/views/trainExam/performance.vue 43 ●●●● patch | view | raw | blame | history
src/views/trainExam/singleperformance.vue 44 ●●●● patch | view | raw | blame | history
src/views/exam/performance.vue
@@ -108,6 +108,8 @@
<script>
import { getList, update } from "@/api/examapi/performance";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
export default {
  data() {
    var validatePass = (rule, value, callback) => {
@@ -508,19 +510,37 @@
  mounted() {},
  methods: {
    questionBankOnLoad(page, params = {}) {
      this.questionBankLoading = false;
      params["examType"] = 1;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.questionBankPage.total = data.total;
        this.questionBankData = data.records;
        this.questionBankLoading = false;
        this.questionBankSelectionClear();
      //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
      var that = this;
      //获取当前登录人员的角色信息
      var roleIds = this.userInfo.role_id.split(",");
      roleIds.forEach((roleId) => {
        getRoleDetail(roleId).then((res) => {
            var roleAlias = res.data.data.roleAlias;
            if (
              roleAlias == "保安公司管理员" ||
              roleAlias == "保安" ||
              roleAlias == "未持证保安"
            ) {
              //如果是保安公司管理员
              params["deptId"] = that.userInfo.dept_id;
            }
            that.questionBankLoading = false;
            params["examType"] = 1;
            getList(
              page.currentPage,
              page.pageSize,
              Object.assign(params, this.query)
            ).then((res) => {
              const data = res.data.data;
              that.questionBankPage.total = data.total;
              that.questionBankData = data.records;
              that.questionBankLoading = false;
              that.questionBankSelectionClear();
            });
        })
      });
    },
    questionBankSelectionClear() {
      this.questionBankSelectionList = [];
src/views/exam/singleperformance.vue
@@ -84,6 +84,8 @@
<script>
import { getList, update } from "@/api/examapi/performance";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
export default {
  data() {
    var validatePass = (rule, value, callback) => {
@@ -437,20 +439,38 @@
        query: obj,
      });
    },
    questionBankOnLoad(page, params = {}) {
      this.questionBankLoading = false;
      params["examType"] = 1;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.questionBankPage.total = data.total;
        this.questionBankData = data.records;
        this.questionBankLoading = false;
        this.questionBankSelectionClear();
        questionBankOnLoad(page, params = {}) {
      //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
      var that = this;
      //获取当前登录人员的角色信息
      var roleIds = this.userInfo.role_id.split(",");
      roleIds.forEach((roleId) => {
        getRoleDetail(roleId).then((res) => {
            var roleAlias = res.data.data.roleAlias;
            if (
              roleAlias == "保安公司管理员" ||
              roleAlias == "保安" ||
              roleAlias == "未持证保安"
            ) {
              //如果是保安公司管理员
              params["deptId"] = that.userInfo.dept_id;
            }
            that.questionBankLoading = false;
            params["examType"] = 1;
            getList(
              page.currentPage,
              page.pageSize,
              Object.assign(params, this.query)
            ).then((res) => {
              const data = res.data.data;
              that.questionBankPage.total = data.total;
              that.questionBankData = data.records;
              that.questionBankLoading = false;
              that.questionBankSelectionClear();
            });
        })
      });
    },
    questionBankSelectionClear() {
      this.questionBankSelectionList = [];
src/views/securityGuard/securityGuard.vue
@@ -853,32 +853,32 @@
            tip: "请上传 .xls,.xlsx 标准格式文件",
            action: "/api/blade-user/import-user",
          },
          {
            label: "数据覆盖",
            prop: "isCovered",
            type: "switch",
            align: "center",
            width: 80,
            dicData: [
              {
                label: "否",
                value: 0,
              },
              {
                label: "是",
                value: 1,
              },
            ],
            value: 0,
            slot: true,
            rules: [
              {
                required: true,
                message: "请选择是否覆盖",
                trigger: "blur",
              },
            ],
          },
          // {
          //   label: "数据覆盖",
          //   prop: "isCovered",
          //   type: "switch",
          //   align: "center",
          //   width: 80,
          //   dicData: [
          //     {
          //       label: "否",
          //       value: 0,
          //     },
          //     {
          //       label: "是",
          //       value: 1,
          //     },
          //   ],
          //   value: 0,
          //   slot: true,
          //   rules: [
          //     {
          //       required: true,
          //       message: "请选择是否覆盖",
          //       trigger: "blur",
          //     },
          //   ],
          // },
          {
            label: "模板下载",
            prop: "excelTemplate",
@@ -954,7 +954,7 @@
      done();
    },
    handleTemplate1() {
      window.open(`/api/examSubjectChoices/export-template`);
      window.open(`/api/blade-user/export-template-security`);
    },
    //行点击事件
src/views/trainExam/performance.vue
@@ -94,6 +94,7 @@
<script>
import { getList, update } from "@/api/examapi/performance";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
export default {
  data() {
    var validatePass = (rule, value, callback) => {
@@ -492,19 +493,37 @@
  },
  methods: {
    questionBankOnLoad(page, params = {}) {
      this.questionBankLoading = false;
      params["examType"] = 2;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.questionBankPage.total = data.total;
        this.questionBankData = data.records;
        this.questionBankLoading = false;
        this.questionBankSelectionClear();
      //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
      var that = this;
      //获取当前登录人员的角色信息
      var roleIds = this.userInfo.role_id.split(",");
      roleIds.forEach((roleId) => {
        getRoleDetail(roleId).then((res) => {
            var roleAlias = res.data.data.roleAlias;
            if (
              roleAlias == "保安公司管理员" ||
              roleAlias == "保安" ||
              roleAlias == "未持证保安"
            ) {
              //如果是保安公司管理员
              params["deptId"] = that.userInfo.dept_id;
            }
            that.questionBankLoading = false;
            params["examType"] = 1;
            getList(
              page.currentPage,
              page.pageSize,
              Object.assign(params, this.query)
            ).then((res) => {
              const data = res.data.data;
              that.questionBankPage.total = data.total;
              that.questionBankData = data.records;
              that.questionBankLoading = false;
              that.questionBankSelectionClear();
            });
        })
      });
    },
    questionBankSelectionClear() {
      this.questionBankSelectionList = [];
src/views/trainExam/singleperformance.vue
@@ -84,6 +84,8 @@
<script>
import { getList, update } from "@/api/examapi/performance";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
export default {
  data() {
    var validatePass = (rule, value, callback) => {
@@ -438,19 +440,37 @@
      });
    },
    questionBankOnLoad(page, params = {}) {
      this.questionBankLoading = false;
      params["examType"] = 2;
      getList(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
        const data = res.data.data;
        this.questionBankPage.total = data.total;
        this.questionBankData = data.records;
        this.questionBankLoading = false;
        this.questionBankSelectionClear();
      //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
      var that = this;
      //获取当前登录人员的角色信息
      var roleIds = this.userInfo.role_id.split(",");
      roleIds.forEach((roleId) => {
        getRoleDetail(roleId).then((res) => {
            var roleAlias = res.data.data.roleAlias;
            if (
              roleAlias == "保安公司管理员" ||
              roleAlias == "保安" ||
              roleAlias == "未持证保安"
            ) {
              //如果是保安公司管理员
              params["deptId"] = that.userInfo.dept_id;
            }
            that.questionBankLoading = false;
            params["examType"] = 1;
            getList(
              page.currentPage,
              page.pageSize,
              Object.assign(params, this.query)
            ).then((res) => {
              const data = res.data.data;
              that.questionBankPage.total = data.total;
              that.questionBankData = data.records;
              that.questionBankLoading = false;
              that.questionBankSelectionClear();
            });
        })
      });
    },
    questionBankSelectionClear() {
      this.questionBankSelectionList = [];