保安服务企业管理项目备份
zhongrj
2024-05-24 f2a74b0b28b74dc29be85ec8e6328bdd262f84b9
src/views/system/user.vue
@@ -70,15 +70,15 @@
              @click="handleReset"
              >密码重置
            </el-button>
            <el-button
              type="info"
              size="small"
              plain
              v-if="userInfo.role_name.includes('admin')"
              icon="el-icon-setting"
              @click="handlePlatform"
              >平台配置
            </el-button>
<!--            <el-button-->
<!--              type="info"-->
<!--              size="small"-->
<!--              plain-->
<!--              v-if="userInfo.role_name.includes('admin')"-->
<!--              icon="el-icon-setting"-->
<!--              @click="handlePlatform"-->
<!--              >平台配置-->
<!--            </el-button>-->
            <el-button
              type="success"
              size="small"
@@ -208,6 +208,7 @@
import { mapGetters } from "vuex";
import website from "@/config/website";
import { getToken } from "@/util/auth";
import dept from "@/views/system/dept.vue";
export default {
  data() {
@@ -717,7 +718,7 @@
    var that = this;
    //公安局进入
    if (this.userInfo.role_name == "公安管理员") {
    if (this.userInfo.role_name == "公安管理员" || this.userInfo.role_name == "民警") {
      var parentId = this.userInfo.dept_id;
      var userId = this.userInfo.Id;
      getDeptLazyTree(parentId, userId).then(res => {
@@ -803,8 +804,24 @@
          column.dicData = b;
        } else if (d == "公安管理员") {
          for (var i in k) {
            if (k[i].title == "公安管理员") {
            if (k[i].title == "公安管理员" || k[i].title == "民警") {
              b.push(k[i]);
            }
          }
          column.dicData = b;
        }else if (d == "民警") {
          for (var z in k) {
            if (k[z].title == "民警") {
              b.push(k[z]);
            }
            if (k[z].children) {
              for (var ff in k[z].children) {
                if (
                  k[z].children[ff].title == "民警"
                ) {
                  b.push(k[z].children[ff]);
                }
              }
            }
          }
          column.dicData = b;
@@ -814,7 +831,7 @@
      });
      // this.userInfo.role_name == "保安公司管理员"
      //公安局进入
      if (this.userInfo.role_name == "公安管理员") {
      if (this.userInfo.role_name == "公安管理员" || this.userInfo.role_name == "民警") {
        var parentId = this.userInfo.dept_id;
        var userId = this.userInfo.Id;
        getDeptLazyTree(parentId, userId).then(res => {
@@ -1008,6 +1025,17 @@
      done();
    },
    handleExport() {
      var deptId = ""
      if (this.treeDeptId == ""){
        if (this.userInfo.role_name.indexOf("administrator") ==-1){
          deptId = this.userInfo.dept_id
        }
      }else{
        deptId = this.treeDeptId.id
      }
      this.$confirm("是否导出用户数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
@@ -1018,7 +1046,7 @@
            this.website.tokenHeader
          }=${getToken()}&account=${this.search.account}&realName=${
            this.search.realName
          }`
          }&deptId=${deptId}`
        );
      });
    },
@@ -1031,7 +1059,7 @@
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        if (this.userInfo.role_name != "公安管理员") {
        if (this.userInfo.role_name != "公安管理员" && this.userInfo.role_name != "民警") {
          const column = this.findObject(this.option.group, "code");
          column.display = false;
        }
@@ -1050,7 +1078,7 @@
        });
      }
      if (["add"].includes(type)) {
        if (this.userInfo.role_name != "公安管理员") {
        if (this.userInfo.role_name != "公安管理员" && this.userInfo.role_name !== "民警") {
          const column = this.findObject(this.option.group, "code");
          column.display = false;
        }
@@ -1071,7 +1099,7 @@
      this.loading = true;
      var deptid = this.deptids == null ? this.treeDeptId.id : this.deptids;
      //公安局进入
      if (this.userInfo.role_name == "公安管理员") {
      if (this.userInfo.role_name == "公安管理员" || this.userInfo.role_name == "民警") {
        params["jurisdiction"] = this.userInfo.jurisdiction;
        params["roleId"] = "1";
      }