liuyg
2021-08-22 7363584e96318fcab937adcc101523fc09638380
Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
5 files modified
267 ■■■■ changed files
src/views/exam/performance.vue 45 ●●●● patch | view | raw | blame | history
src/views/exam/singleperformance.vue 46 ●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 89 ●●●●● 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) => {
@@ -211,6 +213,7 @@
                trigger: "blur",
              },
            ],
            width:160
          },
          {
            label: "所属公司",
@@ -508,19 +511,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
@@ -25,6 +25,7 @@
          :permission="permissionList"
          @row-del="rowDel"
          @row-update="rowUpdate"
          :row-style="rowStyle"
          @row-save="rowSave"
          :before-open="beforeOpen"
          :page.sync="page"
@@ -122,6 +123,14 @@
              v-if="permission.securityGuard_delete"
              @click.stop="rowDel(row)"
              >离职登记
            </el-button>
            <el-button
              icon="el-icon-edit"
              :size="size"
              :type="type"
              v-if="permission.securityGuard_check"
              @click.stop="rowCheck(row)"
              >审查异常标记
            </el-button>
          </template>
@@ -856,32 +865,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",
@@ -957,7 +966,7 @@
      done();
    },
    handleTemplate1() {
      window.open(`/api/examSubjectChoices/export-template`);
      window.open(`/api/blade-user/export-template-security`);
    },
    //行点击事件
@@ -1144,6 +1153,24 @@
          });
        });
    },
    rowCheck(row) {
      this.$confirm("确定审查异常标记?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          row.examinationType = "1";
          return update(row);
        })
        .then(() => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
    },
    searchReset() {
      this.query = {};
      this.treeDeptId = "";
@@ -1288,6 +1315,14 @@
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
    },
    //行样式调整
    rowStyle({ row, column, rowIndex }) {
      if (row.examinationType == "1") {
        return {
          color: "#ff2727",
        };
      }
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
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 = [];