Administrator
2021-08-14 e83ecb7c6d0ab7662518389092e82fb252bc658f
打印路径修改,保安员查询修改
10 files modified
207 ■■■■■ changed files
public/papers.html 2 ●●● patch | view | raw | blame | history
public/papersApply.html 2 ●●● patch | view | raw | blame | history
public/securityPrint.html 2 ●●● patch | view | raw | blame | history
src/api/securityGuard/securityGuard.js 2 ●●● patch | view | raw | blame | history
src/api/system/role.js 11 ●●●●● patch | view | raw | blame | history
src/api/system/user.js 9 ●●●●● patch | view | raw | blame | history
src/views/exam/performance.vue 2 ●●●●● patch | view | raw | blame | history
src/views/securityGuard/data.js 2 ●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 174 ●●●●● patch | view | raw | blame | history
src/views/trainExam/performance.vue 1 ●●●● patch | view | raw | blame | history
public/papers.html
@@ -121,7 +121,7 @@
            var examType = JSON.parse(getData("data")).examType;
            // console.log(JSON.parse(getData("data")), 111);
            axios.get('http://223.82.109.183:2080/apply/getApplyInfo?id=' + id + "&applyExamType=" + examType).then(function(res) {
            axios.get('http://223.82.109.183:2080/api/apply/getApplyInfo?id=' + id + "&applyExamType=" + examType).then(function(res) {
                // axios.get('http://localhost:81/apply/getApplyInfo?id=' + id + "&applyExamType=" + examType).then(function(res) {
                var data = res.data.data;
                var str = `<span class="title">${data.examName}</span>
public/papersApply.html
@@ -77,7 +77,7 @@
            var name = JSON.parse(getData("data")).name;
            // console.log(JSON.parse(getData("data")), 111);
            axios.get('http://223.82.109.183:2080/apply/getApplyDetailList?examId=' + id).then(function(res) {
            axios.get('http://223.82.109.183:2080/api/apply/getApplyDetailList?examId=' + id).then(function(res) {
                // axios.get('http://localhost:81/apply/getApplyDetailList?examId=' + id).then(function(res) {
                var data = res.data;
                var list = data.applyList;
public/securityPrint.html
@@ -199,7 +199,7 @@
        var securityName = JSON.parse(getData("data")).securityName;
        // console.log(JSON.parse(getData("data")), 111);
        axios.get('http://223.82.109.183:2080/apply/userDetail?id=' + id).then(function(res) {
        axios.get('http://223.82.109.183:2080/api/apply/userDetail?id=' + id).then(function(res) {
            var data = res.data.data;
            var str = `<div id="table1"></div>
            <div id="table">
src/api/securityGuard/securityGuard.js
@@ -2,7 +2,7 @@
export const getList = (current, size, params) => {
    return request({
        url: '/api/blade-user/page',
        url: '/api/blade-user/pages',
        method: 'get',
        params: {
            ...params,
src/api/system/role.js
@@ -87,3 +87,14 @@
    }
  })
}
export const getRoleDetail = (id) => {
    return request({
        url: '/api/blade-system/role/details',
        method: 'get',
        params: {
            id,
        }
    })
}
src/api/system/user.js
@@ -31,6 +31,15 @@
    })
}
export const securitySave = (row) => {
    return request({
        url: '/api/blade-user/securitySave',
        method: 'post',
        data: row
    })
}
export const update = (row) => {
    return request({
        url: '/api/blade-user/update',
src/views/exam/performance.vue
@@ -450,9 +450,11 @@
    },
    questionBankRowUpdate(row, index, done, loading) {
      debugger;
      update({
        theoryGrade: row.theoryGrade,
        learnGrade: row.learnGrade,
        examId:row.examId,
        id: row.id,
      }).then(
        () => {
src/views/securityGuard/data.js
@@ -535,7 +535,7 @@
        value: "id",
    },
    slot: true,
    searchSpan: 4,
        searchSpan: 6,
    display: false,
    search: true,
    width: 260
src/views/securityGuard/securityGuard.vue
@@ -247,6 +247,7 @@
  update,
  updatePlatform,
  add,
  securitySave,
  grant,
  resetPassword,
  getUserPractitionersInfo,
@@ -254,12 +255,13 @@
} from "@/api/system/user";
import { getList } from "@/api/securityGuard/securityGuard";
import { getDeptLazyTree } from "@/api/system/dept";
import { getRoleTree } from "@/api/system/role";
import { getRoleTree,getRoleDetail } from "@/api/system/role";
import { getPostList } from "@/api/system/post";
import { mapGetters } from "vuex";
import website from "@/config/website";
import { getToken } from "@/util/auth";
import { securityFormPageColumn } from "./data";
import { mapState } from 'vuex';
export default {
  data() {
@@ -280,6 +282,7 @@
      }
    };
    return {
      securityid:"",
      excelBox1: false,
      excelForm1: {},
      excelOption1: {
@@ -404,7 +407,6 @@
                  value: "id",
                },
                // disabled: true,
                span: 24,
                rules: [
                  {
                    required: true,
@@ -462,6 +464,10 @@
                ],
              },
              {
                label: "昵称",
                prop: "name",
              },
              {
                label: "个人照片",
                type: "upload",
                listType: "picture-img",
@@ -479,14 +485,12 @@
                row: true,
                prop: "myPicture",
              },
              {
                label: "编号",
                prop: "code",
              },
              {
                label: "昵称",
                prop: "name",
              },
              // {
              //   label: "编号",
              //   prop: "code",
              // },
              {
                label: "所属辖区",
                prop: "jurisdiction",
@@ -501,49 +505,49 @@
                slot: true,
                rules: [
                  {
                    required: true,
                    required: false,
                    message: "请选择所属辖区",
                    trigger: "click",
                  },
                ],
              },
              {
                label: "所属角色",
                prop: "roleId",
                multiple: true,
                type: "tree",
                dicData: [],
                props: {
                  label: "title",
                },
                checkStrictly: true,
                slot: true,
                rules: [
                  {
                    required: true,
                    message: "请选择所属角色",
                    trigger: "click",
                  },
                ],
              },
              {
                label: "所属岗位",
                prop: "postId",
                type: "tree",
                multiple: true,
                dicData: [],
                props: {
                  label: "postName",
                  value: "id",
                },
                rules: [
                  {
                    required: false,
                    message: "请选择所属岗位",
                    trigger: "click",
                  },
                ],
              },
              // {
              //   label: "所属角色",
              //   prop: "roleId",
              //   multiple: true,
              //   type: "tree",
              //   dicData: [],
              //   props: {
              //     label: "title",
              //   },
              //   checkStrictly: true,
              //   slot: true,
              //   rules: [
              //     {
              //       required: true,
              //       message: "请选择所属角色",
              //       trigger: "click",
              //     },
              //   ],
              // },
              // {
              //   label: "所属岗位",
              //   prop: "postId",
              //   type: "tree",
              //   multiple: true,
              //   dicData: [],
              //   props: {
              //     label: "postName",
              //     value: "id",
              //   },
              //   rules: [
              //     {
              //       required: false,
              //       message: "请选择所属岗位",
              //       trigger: "click",
              //     },
              //   ],
              // },
              {
                label: "是否持证",
                prop: "hold",
@@ -917,12 +921,29 @@
      });
      return ids.join(",");
    },
    ...mapState({
            userInfo: state => state.user.userInfo
        })
  },
  mounted() {
    this.option.column[0].hide = true
    // 非保安单位模式默认加载管理组数据
    if (!website.tenantMode) {
      this.initData(website.tenantId);
    }
    //获取当前登录人员的角色信息
    var roleIds = this.userInfo.role_id.split(",");
    roleIds.forEach(roleId =>{
        getRoleDetail(roleId).then((res) => {
          var roleAlias = res.data.data.roleAlias;
          if(roleAlias=="保安公司管理员" || roleAlias=="保安" || roleAlias=="未持证保安"){
              const column = this.findObject(this.option.column, "deptId");
              column.search = false;
          }
        })
    })
  },
  methods: {
    handleImport1() {
@@ -1003,26 +1024,43 @@
          userPractitionersList.push(info);
        });
      }
      var IdCardNo = row.id;
      add(row).then(
        () => {
          const experience = {
            securityid: IdCardNo,
      const user = {
          account: row.account,
          address: row.address,
          birthday: row.birthday,
          cardid: row.cardid,
          deptId: row.deptId,
          education: row.education,
          email: row.email,
          height: row.height,
          hold: row.hold,
          jurisdiction: row.jurisdiction,
          myPicture: row.myPicture,
          name:row.name,
          nation:row.nation,
          nativeplace:row.nativeplace,
          password: row.password,
          password2:row.password2,
          phone: row.phone,
          politicaloutlook:row.politicaloutlook,
          realName: row.realName,
          registered:row.registered,
          rtime: row.rtime,
          securitynumber:row.securitynumber,
          sex: row.sex
      }
      const userMap = {
            user: user,
            userPractitionersInfo: userPractitionersList,
          };
          //新增从业信息
          saveOrUpdateUserPractitionersInfo(experience).then(() => {
      securitySave(userMap).then(
        () => {
            this.$message({
              type: "success",
              message: "操作成功!",
            });
          });
          this.initFlag = false;
          this.onLoad(this.page);
          // this.$message({
          //   type: "success",
          //   message: "操作成功!",
          // });
          done();
        },
        (error) => {
@@ -1257,10 +1295,22 @@
      };
      values = {
        ...params,
        deptId: this.deptId,
        roleId: this.roleId,
        roleAlias:"111",
        ...this.query,
      };
      //获取当前登录人员的角色信息
      var roleIds = this.userInfo.role_id.split(",");
      roleIds.forEach(roleId =>{
          getRoleDetail(roleId).then((res) => {
            var roleAlias = res.data.data.roleAlias;
            if(roleAlias=="保安公司管理员"){
                values["deptId"] = this.userInfo.dept_id;
            }
          })
      })
      if (this.userInfo.role_id == "1414840172333842433") {
        console.log("是公安add jurisdiction");
        values["jurisdiction"] = this.userInfo.jurisdiction;
src/views/trainExam/performance.vue
@@ -453,6 +453,7 @@
      update({
        theoryGrade: row.theoryGrade,
        learnGrade: row.learnGrade,
        examId:row.examId,
        id: row.id,
      }).then(
        () => {