保安服务企业管理-验收版本
liuyg
2021-11-25 14ea5e160b76663b10b697440da6a119cfc5562a
+公司登入自动填公司deptid
6 files modified
140 ■■■■ changed files
src/views/applyexam/index.vue 55 ●●●●● 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 70 ●●●●● 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: [
    {
@@ -198,8 +199,9 @@
export default {
  data() {
    return {
      obj:{
        userId:''
      obj: {
        userId: "",
        deptId: "",
      },
      dialogFormVisible: false,
      dialogExamFormVisible: false,
@@ -485,8 +487,8 @@
            prop: "deptId",
            type: "tree",
            hide: true,
            viewDisabled:false,
            viewDisplay:false,
            viewDisabled: false,
            viewDisplay: false,
            dicUrl:
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
            props: {
@@ -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: [
@@ -609,7 +611,7 @@
            addDisabled: true,
            // 表单新增时是否可见
            addDisplay: true,
            hide:true,
            hide: true,
            rules: [
              {
                required: true,
@@ -816,15 +818,15 @@
    "obj.userId": {
      // form是表单或者表格绑定的数据集,v-model='form'
      handler(val) {
        if(val){
        if (val) {
          //查询用户信息
          getUserDetails(this.userId).then((res)=>{
          getUserDetails(this.userId).then((res) => {
            var data = res.data.data;
            this.obj.cardid = data.cardid;
            this.obj.age = data.age;
            this.obj.nativeplace = data.nativeplace;
            this.obj.phone = data.phone;
          })
          });
        }
      },
      immediate: true,
@@ -863,11 +865,30 @@
      return ids.join(",");
    },
    userId() {
        var d = this.obj.userId + "";
        return d;
      var d = this.obj.userId + "";
      return d;
    },
  },
  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;
@@ -943,7 +964,7 @@
    },
    questionBankSearchReset() {
      this.questionBankQuery = {
        applyStatus:1,
        applyStatus: 1,
      };
      this.questionBankOnLoad(this.questionBankPage);
    },
@@ -957,7 +978,7 @@
    // 新增
    questionBankRowSave(row, done, loading) {
      // debugger;
      console.log(row,11111);
      console.log(row, 11111);
      addApply(row).then(
        (res) => {
          this.questionBankOnLoad(this.questionBankPage);
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">
@@ -61,7 +62,7 @@
            <template slot="menuLeft">
              <el-button
                type="primary"
                style="display:none"
                style="display: none"
                size="small"
                plain
                icon="el-icon-folder-checked"
@@ -71,7 +72,7 @@
              </el-button>
              <!-- v-if="examPersission" -->
              <el-button
                style="display:none"
                style="display: none"
                type="primary"
                size="small"
                plain
@@ -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:''
      obj: {
        userId: "",
        deptId: "",
      },
      dialogFormVisible: false,
      dialogExamFormVisible: false,
@@ -476,8 +478,8 @@
            prop: "deptId",
            type: "tree",
            hide: true,
            viewDisabled:false,
            viewDisplay:false,
            viewDisabled: false,
            viewDisplay: false,
            dicUrl:
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
            props: {
@@ -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: [
@@ -536,9 +538,8 @@
            label: "培训机构名称",
            prop: "trainingUnitId",
            type: "select",
            labelWidth:110,
            dicUrl:
              "/api/information/train-unit-tree",
            labelWidth: 110,
            dicUrl: "/api/information/train-unit-tree",
            hide: true,
            slot: true,
            searchSpan: 4,
@@ -644,7 +645,7 @@
            addDisabled: true,
            // 表单新增时是否可见
            addDisplay: true,
            hide:true,
            hide: true,
            rules: [
              {
                required: true,
@@ -851,15 +852,15 @@
    "obj.userId": {
      // form是表单或者表格绑定的数据集,v-model='form'
      handler(val) {
        if(val){
        if (val) {
          //查询用户信息
          getUserDetails(this.userId).then((res)=>{
          getUserDetails(this.userId).then((res) => {
            var data = res.data.data;
            this.obj.cardid = data.cardid;
            this.obj.age = data.age;
            this.obj.nativeplace = data.nativeplace;
            this.obj.phone = data.phone;
          })
          });
        }
      },
      immediate: true,
@@ -898,11 +899,34 @@
      return ids.join(",");
    },
    userId() {
        var d = this.obj.userId + "";
        return d;
      var d = this.obj.userId + "";
      return d;
    },
  },
  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;
@@ -978,7 +1002,7 @@
    },
    questionBankSearchReset() {
      this.questionBankQuery = {
        cancel:11,
        cancel: 11,
      };
      this.questionBankOnLoad(this.questionBankPage);
    },
@@ -992,7 +1016,7 @@
    // 新增
    questionBankRowSave(row, done, loading) {
      // debugger;
      console.log(row,11111);
      console.log(row, 11111);
      adddata(row).then(
        (res) => {
          this.questionBankOnLoad(this.questionBankPage);
@@ -1101,7 +1125,7 @@
      })
        .then(() => {
          row.cancel = 2;
          row['isExam'] = 1;
          row["isExam"] = 1;
          return cancelTrain(row);
        })
        .then(() => {