cy
2023-11-25 44f0822917eb31075a0ad1ce13da389240df35c3
feat: 人员角色编辑
2个文件已修改
47 ■■■■■ 已修改文件
admin-web/src/views/systemManger/server/user/edit.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/systemManger/server/user/editRole.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin-web/src/views/systemManger/server/user/edit.vue
@@ -149,17 +149,18 @@
        methods: {
            // 获取所有角色
            getAllRole() {
              const user = this.$store.getters.userInfo
              // const user = this.$store.getters.userInfo
              // this.data_scope = 1
              // if (user.lv == 1) {
              //   this.data_scope = 1
              // }
              // if (user.lv == 2) {
              //   this.data_scope = 2
              // }
              // if (user.lv == 3) {
              //   this.data_scope = 3
              // }
              this.data_scope = 1
              if (user.lv == 1) {
                this.data_scope = 1
              }
              if (user.lv == 2) {
                this.data_scope = 2
              }
              if (user.lv == 3) {
                this.data_scope = 3
              }
              role.listRoleByDataScope({dataScope: this.data_scope}).then(response => {
                  if (response) {
                    this.roleOptions = response;
admin-web/src/views/systemManger/server/user/editRole.vue
@@ -76,16 +76,22 @@
    // 获取所有角色
    getAllRole() {
      const user = this.$store.getters.userInfo
      if (user.lv == 1) {
        this.data_scope = 1
      }
      if (user.lv == 2) {
        this.data_scope = 2
      }
      if (user.lv == 3) {
        this.data_scope = 3
      }
      role.listRoleByDataScope({dataScope: this.data_scope}).then(response => {
      // debugger
      // if (user == undefined){
      //   this.data_scope = 1
      // } else {
      //   if (user.lv==null|| user.lv== 1) {
      //     this.data_scope = 1
      //   }
      //   if (user.lv && user.lv== 2) {
      //     this.data_scope = 2
      //   }
      //   if (user.lv && user.lv== 3) {
      //     this.data_scope = 3
      //   }
      // }
      this.data_scope = 1
      role.listRole({dataScope: this.data_scope}).then(response => {
            if (response) {
              this.roleOptions = response;
            } else {