linwenling
2023-10-07 e14105c5d2c7456b6d13141a0327cc27586dfb2f
11权限
1个文件已修改
49 ■■■■■ 已修改文件
ruoyi-ui/src/views/system/user/profile/index.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/user/profile/index.vue
@@ -218,43 +218,45 @@
import userInfo from "./userInfo";
import resetPwd from "./resetPwd";
import { getUserProfile ,getSelfPermission} from "@/api/system/user";
import {updateFamilyevent} from "@/api/bignote";
export default {
  name: "Profile",
  components: { userAvatar, userInfo, resetPwd },
  data() {
    return {
      data: {
      formDat: {
        familyName: undefined,
        modelName: undefined,
      },
      selectedFamily: '', // 初始化选中的家庭为空字符串
      SelfPermission:undefined,
      SelfPermissionList:[],
      user: {},
      roleGroup: {},
      postGroup: {},
      activeTab: "userinfo",
      activeTab1:"ueserinfopermission"
      activeTab1:"家根网"
    };
  },
  created() {
    this.getUser();
    this.getUserPermission();
    this.getList();
  },
  methods: {
    handleTabClick(tab) {
      this.selectedTab = tab.label;
      if (this.selectedFamily && this.selectedTab) {
        this.getUserPermission(); // 调用 getList 方法
        this.getList();
      }
    },
    handleDropdownCommand(command) {
      this.selectedFamily = command; // 更新选中的家庭
      console.log(this.selectedFamily)
      // 检查下拉菜单和切片页面是否都被选中
      if (this.selectedFamily && this.selectedTab) {
        this.getUserPermission(); // 调用 getList 方法
        this.getList();
      }
    },
@@ -266,30 +268,23 @@
        this.postGroup = response.postGroup;
      });
    },
    getUserPermission(){
      console.log(this.selectedTab)
      console.log(this.selectedFamily)
      this.data = ({
        familyName: this.selectedFamily,
        modelName: this.selectedTab
    getList() {
      var formData = {
        "familyName": "一号家庭",
        "modelName": "家根网"
      };
      var jsonString = JSON.stringify(formData);
      console.log(jsonString);
      getSelfPermission(jsonString).then(response => {
        this.SelfPermissionList = response.data;
        console.log(this.SelfPermissionList)
      });
      console.log(this.data)
      console.log(typeof this.data)
      const jsonData = JSON.stringify(this.data); // 将对象转换为 JSON 字符串
      console.log(jsonData); // 打印 JSON 字符串
      // debugger
      if(jsonData){
      getSelfPermission(jsonData).then(response => {
          this.SelfPermission = response.data;
          console.log(111);
          console.log(this.SelfPermission);
        })
        .catch(error => {
          // 处理错误
        });
      }
    }
  }
};
</script>
<style>