保安服务企业管理-验收版本
liuyg
2021-11-25 14ea5e160b76663b10b697440da6a119cfc5562a
+公司登入自动填公司deptid
6 files modified
94 ■■■■ changed files
src/views/applyexam/index.vue 35 ●●●● patch | view | raw | blame | history
src/views/securityAnalysis/child/certificate.vue 1 ●●●● patch | view | raw | blame | history
src/views/securityAnalysis/child/examination.vue 2 ●●● patch | view | raw | blame | history
src/views/securityAnalysis/child/situation.vue 1 ●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 11 ●●●●● patch | view | raw | blame | history
src/views/trainingRegistration/index.vue 44 ●●●● patch | view | raw | blame | history
src/views/applyexam/index.vue
@@ -1,8 +1,8 @@
/*
 * @Author: Morpheus
 * @Date: 2021-07-05 16:31:54
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-19 19:39:45
 * @Last Modified by: liu
 * @Last Modified time: 2021-11-25 19:32:55
 * menu-name 报名考试
 */
<template>
@@ -27,6 +27,7 @@
            @size-change="questionBankSizeChange"
            @row-save="questionBankRowSave"
            @row-del="questionBankRowDel"
            :before-open="beforeOpen"
          >
            <!-- 自定义按钮 -->
            <!-- <template slot="menuLeft">
@@ -181,7 +182,7 @@
import { mapState } from "vuex";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
import { getUserDetails } from "@/api/experience/experience"
import { getUserDetails } from "@/api/experience/experience";
var DIC = {
  applyStatus: [
    {
@@ -199,7 +200,8 @@
  data() {
    return {
      obj:{
        userId:''
        userId: "",
        deptId: "",
      },
      dialogFormVisible: false,
      dialogExamFormVisible: false,
@@ -503,7 +505,7 @@
            prop: "userId",
            type: "tree",
            dicUrl:
              "/api/blade-user/security-apply-tree?examType=1&deptId={{key}}",
              "/api/blade-user/page-security-units?status=1&deptId={{key}}",
            hide: true,
            slot: true,
            searchSpan: 4,
@@ -522,7 +524,7 @@
            // 表单编辑时是否为查看模式
            editDetail: false,
            props: {
              label: "name",
              label: "realName",
              value: "id",
            },
            rules: [
@@ -824,7 +826,7 @@
            this.obj.age = data.age;
            this.obj.nativeplace = data.nativeplace;
            this.obj.phone = data.phone;
          })
          });
        }
      },
      immediate: true,
@@ -868,6 +870,25 @@
    },
  },
  methods: {
    beforeOpen(done, type) {
      //  :before-open="beforeOpen"
      if (this.userInfo.role_name == "保安公司管理员") {
        // console.log("保安公司管理员登入");
        const deptColumn = this.findObject(
          this.questionBankOption.column,
          "deptId"
        );
        deptColumn.disabled = true;
        this.obj["deptId"] = this.userInfo.dept_id;
      } else {
        const deptColumn = this.findObject(
          this.questionBankOption.column,
          "dispatcherUnitId"
        );
        deptColumn.search = false;
      }
      done();
    },
    //准考证查看
    handlePrint(row) {
      var obj = row;
src/views/securityAnalysis/child/certificate.vue
@@ -177,6 +177,7 @@
        ...params,
        ...this.query1,
        status: 1,
        roleAlias: 111,
        ...this.card,
      };
      getList(page.currentPage, page.pageSize, params).then((res) => {
src/views/securityAnalysis/child/examination.vue
@@ -5,7 +5,7 @@
      :data="data1"
      :page.sync="page1"
      :table-loading="loading1"
      @on-load="getPractitionersPageInfo(page1)"
      @on-load="getPractitionersPageInfo"
      @search-change="searchChange"
      @search-reset="searchReset"
      @refresh-change="refreshChange"
src/views/securityAnalysis/child/situation.vue
@@ -173,6 +173,7 @@
        ...params,
        ...this.query1,
        status: 1,
        roleAlias: 111,
        ...this.card,
      };
      getList(page.currentPage, page.pageSize, params).then((res) => {
src/views/securityGuard/securityGuard.vue
@@ -1659,6 +1659,17 @@
          this.platformForm = res.data.data;
        });
      }
      if (this.userInfo.role_name == "保安公司管理员") {
        // console.log("保安公司管理员登入");
        const deptColumn = this.findObject(
          this.questionBankOption.column,
          "deptId"
        );
        deptColumn.disabled = true;
        console.log(this.userInfo.dept_id);
        this.obj["deptId"] = this.userInfo.dept_id;
      }
      done();
    },
    platformSearchReset() {
src/views/trainingRegistration/index.vue
@@ -1,8 +1,8 @@
/*
 * @Author: Morpheus
 * @Date: 2021-07-05 16:31:54
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-07-19 19:39:45
 * @Last Modified by: liu
 * @Last Modified time: 2021-11-25 19:32:21
 * menu-name 报名考试
 */
<template>
@@ -27,6 +27,7 @@
            @size-change="questionBankSizeChange"
            @row-save="questionBankRowSave"
            @row-del="questionBankRowDel"
            :before-open="beforeOpen"
          >
            <!-- 自定义按钮 -->
            <!-- <template slot="menuLeft">
@@ -184,13 +185,14 @@
import { mapState } from "vuex";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
import { getUserDetails } from "@/api/experience/experience"
import { getUserDetails } from "@/api/experience/experience";
export default {
  data() {
    return {
      obj:{
        userId:''
        userId: "",
        deptId: "",
      },
      dialogFormVisible: false,
      dialogExamFormVisible: false,
@@ -501,7 +503,7 @@
            prop: "userId",
            type: "tree",
            dicUrl:
              "/api/blade-user/security-apply-tree?examType=2&deptId={{key}}",
              "/api/blade-user/page-security-units?status=1&deptId={{key}}",
            hide: true,
            slot: true,
            searchSpan: 4,
@@ -520,7 +522,7 @@
            // 表单编辑时是否为查看模式
            editDetail: false,
            props: {
              label: "name",
              label: "realName",
              value: "id",
            },
            rules: [
@@ -537,8 +539,7 @@
            prop: "trainingUnitId",
            type: "select",
            labelWidth:110,
            dicUrl:
              "/api/information/train-unit-tree",
            dicUrl: "/api/information/train-unit-tree",
            hide: true,
            slot: true,
            searchSpan: 4,
@@ -859,7 +860,7 @@
            this.obj.age = data.age;
            this.obj.nativeplace = data.nativeplace;
            this.obj.phone = data.phone;
          })
          });
        }
      },
      immediate: true,
@@ -903,6 +904,29 @@
    },
  },
  methods: {
    beforeOpen(done, type) {
      //  :before-open="beforeOpen"
      //  deptId: "",
      //       realName
      // `/api/blade-user/page-security-units?status=1&deptId={{key}}`
      if (this.userInfo.role_name == "保安公司管理员") {
        // console.log("保安公司管理员登入");
        const deptColumn = this.findObject(
          this.questionBankOption.column,
          "deptId"
        );
        deptColumn.disabled = true;
        console.log(this.userInfo.dept_id);
        this.obj["deptId"] = this.userInfo.dept_id;
      } else {
        const deptColumn = this.findObject(
          this.questionBankOption.column,
          "dispatcherUnitId"
        );
        deptColumn.search = false;
      }
      done();
    },
    //准考证查看
    handlePrint(row) {
      var obj = row;
@@ -1101,7 +1125,7 @@
      })
        .then(() => {
          row.cancel = 2;
          row['isExam'] = 1;
          row["isExam"] = 1;
          return cancelTrain(row);
        })
        .then(() => {