Administrator
2021-12-21 04322bad2aa10ab3cc3abf56de9905ef9aa28c65
派遣记录,单位,保安员管理修改
3 files modified
131 ■■■■■ changed files
src/views/dispatch/dispatch.vue 123 ●●●●● patch | view | raw | blame | history
src/views/dispatch/dispatchChildoperable.vue 4 ●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 4 ●●●● patch | view | raw | blame | history
src/views/dispatch/dispatch.vue
@@ -214,7 +214,6 @@
      },
      option: {
        tip: false,
        // card: true,
        index: true,
        searchSize: "mini",
        searchMenuSpan: 6,
@@ -224,7 +223,6 @@
        selection: true,
        ...this.$store.state.control.clearOtherBut,
        column: [
          //派遣服务公司登记
          {
            label: "派遣单位名称",
            prop: "name",
@@ -233,7 +231,6 @@
            overHidden: true,
            searchSpan: 4,
            width: 210,
            // span: 12,
            labelWidth: 138,
            rules: [
              {
@@ -253,11 +250,6 @@
              label: "title",
              value: "id",
            },
            // hide: true,
            // hide: !website.tenantMode,
            // addDisplay: website.tenantMode,
            // editDisplay: website.tenantMode,
            // viewDisplay: website.tenantMode,
            rules: [
              {
                required: true,
@@ -270,21 +262,8 @@
            searchLabelWidth: 80,
            search: true,
            searchSpan: 4,
            // editDisplay: false,
            // addDisplay: false,
            // hide: true,
            // span: 11,
          },
          {
            label: "保安服务类型",
            prop: "serveType",
            // search: true,
            searchLabelWidth: 110,
            searchSpan: 4,
            overHidden: true,
            // span: 12,
            labelWidth: 138,
          },
          {
            label: "合同生效时间",
            prop: "releaseTimeRange",
@@ -365,30 +344,6 @@
            prop: "address",
            labelWidth: 138,
          },
          // {
          //   label: "合同生效时间",
          //   prop: "releaseTimeRange",
          //   type: "date",
          //   format: "yyyy-MM-dd",
          //   valueFormat: "yyyy-MM-dd",
          //   searchValue: [this.getStartTime(), this.getEndTime()],
          //   // searchRange: true,
          //   searchSpan: 5,
          //   searchLabelWidth: 110,
          //   hide: true,
          //   value: [this.getStartTime(), this.getEndTime()],
          //   // addDisplay: false,
          //   // editDisplay: false,
          //   // viewDisplay: false,
          //   range: true,
          //   rules: [
          //     {
          //       required: true,
          //       message: "请输入时间",
          //       trigger: "blur",
          //     },
          //   ],
          // },
          {
            label: "合同开始时间",
            prop: "startTime",
@@ -404,8 +359,6 @@
                trigger: "click",
              },
            ],
            // searchSpan: 4,
            // overHidden: true
          },
          {
            label: "合同结束时间",
@@ -442,17 +395,6 @@
            prop: "phone",
            labelWidth: 138,
            width: 130,
            // rules: [
            //   {
            //     required: true,
            //     message: "请输入联系方式",
            //     trigger: "click",
            //   },
            //   {
            //     validator: phones,
            //     trigger: ["change", "blur"],
            //   },
            // ],
          },
          {
            label: " 负责人",
@@ -484,6 +426,16 @@
            ],
          },
          {
            label: "保安服务类型",
            prop: "serveType",
            // search: true,
            searchLabelWidth: 110,
            searchSpan: 4,
            overHidden: true,
            // span: 12,
            labelWidth: 138,
          },
          {
            label: "派遣保安员数",
            prop: "num",
            type: "number",
@@ -505,23 +457,44 @@
  },
  created() {
    var that = this;
    if (this.userInfo.role_name == "保安公司管理员") {
      const deptColumn = this.findObject(this.option.column, "deptId");
      deptColumn.search = false;
      deptColumn.addDisplay = false;
      deptColumn.editDisplay = false;
      deptColumn.viewDisplay = false;
      deptColumn.hide = true;
    var roleName = this.userInfo.role_name;
    // if (this.userInfo.role_name == "保安公司管理员") {
    //   const deptColumn = this.findObject(this.option.column, "deptId");
    //   deptColumn.search = false;
    //   deptColumn.addDisplay = false;
    //   deptColumn.editDisplay = false;
    //   deptColumn.viewDisplay = false;
    //   deptColumn.hide = true;
    //   this.useifid = this.userInfo.dept_id;
    // }
    if (
      roleName == "保安公司管理员" ||
      roleName == "保安" ||
      roleName == "分公司管理员"
    ) {
      //查询保安单位信息(包含子级)
      const column = this.findObject(this.option.column, "deptId");
      // column.search = false;
      //默认全部展开
      column.defaultExpandAll = true;
      column.dicUrl =
        "/api/blade-system/dept/security_lazy-tree?deptId=" +
        this.userInfo.dept_id;
      //赋值
      column.value = that.userInfo.dept_id;
      this.useifid = this.userInfo.dept_id;
    }
    //公安局进入
    if (this.userInfo.role_name == "公安管理员") {
      that.option.column[1].dicUrl =
        "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697&jurisdiction=" +
    } else if (roleName == "公安管理员" || roleName == "administrator") {
      var columnDept = that.findObject(that.option.column, "deptId");
      columnDept.dicUrl =
        "/api/blade-system/dept/security_lazy-tree?jurisdiction=" +
        that.userInfo.jurisdiction;
    } else {
      that.option.column[1].dicUrl =
        "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
      //查询保安单位信息(包含子级)
      const column = this.findObject(this.option.column, "deptId");
      // column.search = false;
      //默认全部展开
      column.dicUrl = "/api/blade-system/dept/security_lazy-tree";
    }
  },
  computed: {
@@ -571,7 +544,6 @@
      //   this.$message.success("页码" + val);
    },
    rowSave(form, done, loading) {
      // form["deptId"] = this.userInfo.dept_id;
      if (this.useifid != 266) {
        form["deptId"] = this.useifid;
      }
@@ -669,10 +641,7 @@
      window.localStorage.setItem("paqiandata", JSON.stringify(row));
      this.$router.push({
        path: "/dispatchChild",
        // redirect: { name: "foo" },
        // query: { row: row },
        query: { rowdispatch: "fromDispatch" },
        // params: { row: row.identificationnumber },
      });
    },
    getStartTime() {
src/views/dispatch/dispatchChildoperable.vue
@@ -87,7 +87,7 @@
            editDisplay: false,
          },
          {
            label: "保安公司",
            label: "企业名称",
            prop: "deptId",
            search: true,
            labelWidth: 120,
@@ -103,7 +103,7 @@
            rules: [
              {
                required: true,
                message: "请输入保安公司",
                message: "请输入企业名称",
                trigger: "blur",
              },
            ],
src/views/securityGuard/securityGuard.vue
@@ -1791,7 +1791,7 @@
          return securityApply(data);
        })
        .then(() => {
          // this.$refs.crud.toggleSelection();
          this.$refs.crud.toggleSelection();
          this.$message({
            type: "success",
            message: "操作成功!",
@@ -1829,7 +1829,7 @@
          return securityApply(data);
        })
        .then(() => {
          // this.$refs.crud.toggleSelection();
          this.$refs.crud.toggleSelection();
          this.$message({
            type: "success",
            message: "操作成功!",