Administrator
2021-11-03 edb1a152251d4bef4add7a6f2567cbf6d6c9f017
制证申请新增
3 files modified
1 files added
125 ■■■■■ changed files
src/api/accreditationRecords/accreditationRecords.js 49 ●●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 71 ●●●●● patch | view | raw | blame | history
src/views/trainingRegistration/index.vue 1 ●●●● patch | view | raw | blame | history
vue.config.js 4 ●●●● patch | view | raw | blame | history
src/api/accreditationRecords/accreditationRecords.js
New file
@@ -0,0 +1,49 @@
import request from '@/router/axios';
export const getList = (current, size, params, deptId) => {
    return request({
        url: '/api/accreditationRecords/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
            deptId,
        }
    })
}
export const remove = (ids) => {
    return request({
        url: '/api/accreditationRecords/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}
export const add = (row) => {
    return request({
        url: '/api/accreditationRecords/submit',
        method: 'post',
        data: row
    })
}
export const update = (row) => {
    return request({
        url: '/api/accreditationRecords/update',
        method: 'post',
        data: row
    })
}
export const securityApply = (row) => {
    return request({
        url: '/api/accreditationRecords/securityApply',
        method: 'post',
        data: row
    })
}
src/views/securityGuard/securityGuard.vue
@@ -58,6 +58,16 @@
              >个人照片批量上传
            </el-button>
            <el-button
              type="primary"
              size="small"
              plain
              v-if="permission.securityGuard_security_apply"
              icon="el-icon-s-promotion"
              @click="handleSecurityApply"
              >制证申请
            </el-button>
            <el-button
              type="danger"
              style="display: none"
              size="small"
@@ -299,6 +309,7 @@
  getUserPractitionersInfo,
  saveOrUpdateUserPractitionersInfo,
} from "@/api/system/user";
import {securityApply} from '@/api/accreditationRecords/accreditationRecords'
import { getList } from "@/api/securityGuard/securityGuard";
import { getDeptLazyTree } from "@/api/system/dept";
import { getRoleTree, getRoleDetail } from "@/api/system/role";
@@ -505,12 +516,20 @@
          children: "children",
        },
      },
      choiceList: [],
      option: {
        height: "auto",
        calcHeight: 80,
        tip: false,
        tip: true,
        searchShow: true,
        reserveSelection:true,
        selectable: (row) => {
          if (row.hold!=="1") {
            return false;
          } else {
            return true;
          }
        },
        indexWidth: 55,
        searchMenuSpan: 6,
        stripe: true,
@@ -1101,6 +1120,42 @@
        this.onLoad(this.page);
      });
    },
    //制证申请
    handleSecurityApply(){
      if (this.choiceList.length === 0) {
        this.$message.warning("请勾选至少一位持证保安员");
        return;
      }
        this.$confirm("共选择制证申请人数"+this.choiceList.length+"人,确定申请制证?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          let cho = this.choiceList;
          console.log(this.choiceList,14521);
          let str = "";
          for (let k in cho) {
            str += cho[k].id;
            if (k != cho.length - 1) {
              str += ",";
            }
          }
          console.log(str,1132);
          const data = {
            ids:str,
            createUser:this.userInfo.user_id
          }
          return securityApply(data);
        })
        .then(() => {
          // this.$refs.crud.toggleSelection();
          this.$message({
            type: "success",
            message: "操作成功!",
          });
        });
    },
    rowSave(row, done, loading) {
      if (row.deptId) {
        row.deptId = row.deptId;
@@ -1266,11 +1321,17 @@
      done();
    },
    selectionChange(list) {
      this.selectionList = list;
      // this.selectionList = list;
      this.choiceList = [];
      for (let k in list) {
        this.choiceList.push({
          id: list[k].id,
        });
      }
    },
    selectionClear() {
      this.selectionList = [];
      this.$refs.crud.toggleSelection();
      // this.selectionList = [];
      // this.$refs.crud.toggleSelection();
    },
    handleDelete() {
      if (this.selectionList.length === 0) {
src/views/trainingRegistration/index.vue
@@ -134,7 +134,6 @@
  data() {
    return {
      choiceName: [],
      loading: true,
      excelBox: false,
      dialogExamFormVisible: false,
vue.config.js
@@ -27,8 +27,8 @@
        proxy: {
            '/api': {
                // 本地服务接口地址
                // target: 'http://localhost:81',
                target: 'http://192.168.0.114:81',//钟日健W
                target: 'http://localhost:81',
                // target: 'http://192.168.0.114:81',//钟日健W
                // target: 'http://localhost:81', //原W
                // target: 'http://192.168.0.108:81',//原W
                // target: 'http://192.168.0.107:81',//唐N