liuyg
2021-08-19 0c35e05ca9c90883e5073ea35232ea100f866a8f
src/views/companyApply/index.vue
@@ -90,7 +90,7 @@
            append-to-body
            :visible.sync="dialogBatchFormVisible"
            width="1000px"
            @close='closeDialog'
            @close="closeDialog"
          >
            <avue-form
              ref="formBatchApply"
@@ -107,8 +107,12 @@
</template>
<script>
import { addApply, cancelApplyNotApplyId, remove } from "@/api/examapi/applyexam";
import { getListApply,addBatchApply } from "@/api/securityGuard/securityGuard";
import {
  addApply,
  cancelApplyNotApplyId,
  remove,
} from "@/api/examapi/applyexam";
import { getListApply, addBatchApply } from "@/api/securityGuard/securityGuard";
import { mapState } from "vuex";
var DIC = {
@@ -138,7 +142,7 @@
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        border: false,
        border: true, //liu
        index: true,
        stripe: true,
        viewBtn: false,
@@ -192,7 +196,7 @@
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        border: false,
        border: true, //liu
        index: true,
        stripe: true,
        viewBtn: true,
@@ -212,7 +216,7 @@
              value: "id",
            },
            //不包含父节点值
            leafOnly:true,
            leafOnly: true,
            multiple: true,
            searchSpan: 5,
            rules: [
@@ -418,12 +422,9 @@
    // }
    this.optionBatchApply.column[0].dicUrl =
        "/api/blade-user/security-apply-tree?deptId=" +
        this.userInfo.dept_id;
      "/api/blade-user/security-apply-tree?deptId=" + this.userInfo.dept_id;
  },
  mounted() {
  },
  mounted() {},
  computed: {
    ...mapState({
      userInfo: (state) => state.user.userInfo,
@@ -545,7 +546,7 @@
      })
        .then(() => {
          row.applyStatus = 4;
          row['userId'] = row.id;
          row["userId"] = row.id;
          return cancelApplyNotApplyId(row);
        })
        .then(() => {
@@ -561,72 +562,72 @@
    handleBatchApply() {
      // this.dialogBatchFormVisible = true;
      if (this.questionBankSelectionList.length === 0) {
          this.$confirm("确定全部人员报名?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          }).then(() => {
            var userIds = "";
            addBatchApply(userIds,this.userInfo.dept_id).then(
              (res) => {
                this.questionBankOnLoad(this.questionBankPage);
                if (res.data.data == 201) {
                  this.$message({
                    type: "warning",
                    message: "已报名,不能重复报名",
                  });
                } else if (res.data.data == 201) {
                  this.$message({
                    type: "warning",
                    message: "报名失败",
                  });
                } else {
                  this.$message({
                    type: "success",
                    message: "报名成功",
                  });
                  this.$refs.formBatchApply.resetFields();
                  this.dialogBatchFormVisible = false;
                }
              },
              (error) => {
                window.console.log(error);
        this.$confirm("确定全部人员报名?", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }).then(() => {
          var userIds = "";
          addBatchApply(userIds, this.userInfo.dept_id).then(
            (res) => {
              this.questionBankOnLoad(this.questionBankPage);
              if (res.data.data == 201) {
                this.$message({
                  type: "warning",
                  message: "已报名,不能重复报名",
                });
              } else if (res.data.data == 201) {
                this.$message({
                  type: "warning",
                  message: "报名失败",
                });
              } else {
                this.$message({
                  type: "success",
                  message: "报名成功",
                });
                this.$refs.formBatchApply.resetFields();
                this.dialogBatchFormVisible = false;
              }
            );
        })
      }else{
            },
            (error) => {
              window.console.log(error);
            }
          );
        });
      } else {
        this.$confirm("确定选择人员报名?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          }).then(() => {
            addBatchApply(this.ids,this.userInfo.dept_id).then(
              (res) => {
                this.questionBankOnLoad(this.questionBankPage);
                if (res.data.data == 201) {
                  this.$message({
                    type: "warning",
                    message: "已报名,不能重复报名",
                  });
                } else if (res.data.data == 201) {
                  this.$message({
                    type: "warning",
                    message: "报名失败",
                  });
                } else {
                  this.$message({
                    type: "success",
                    message: "报名成功",
                  });
                  this.$refs.formBatchApply.resetFields();
                  this.dialogBatchFormVisible = false;
                }
              },
              (error) => {
                window.console.log(error);
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }).then(() => {
          addBatchApply(this.ids, this.userInfo.dept_id).then(
            (res) => {
              this.questionBankOnLoad(this.questionBankPage);
              if (res.data.data == 201) {
                this.$message({
                  type: "warning",
                  message: "已报名,不能重复报名",
                });
              } else if (res.data.data == 201) {
                this.$message({
                  type: "warning",
                  message: "报名失败",
                });
              } else {
                this.$message({
                  type: "success",
                  message: "报名成功",
                });
                this.$refs.formBatchApply.resetFields();
                this.dialogBatchFormVisible = false;
              }
            );
        })
            },
            (error) => {
              window.console.log(error);
            }
          );
        });
      }
    },
@@ -663,8 +664,8 @@
    // },
    //关闭窗口清除数据
    closeDialog(){
        this.$refs.formBatchApply.resetFields();
    closeDialog() {
      this.$refs.formBatchApply.resetFields();
    },
    questionBankHandleDelete() {