yinbangzhong
2024-08-29 30c1eeca00527a1294c62b1c708edd32ba079b67
select role
2个文件已修改
10 ■■■■ 已修改文件
src/store/modules/user/index.ts 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dmx/knowledgeLib/config.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user/index.ts
@@ -81,7 +81,13 @@
        this.name=res.data.userName
     
        if(res.data?.roles.length>0)
            this.resources=res.data.roles[0].resources;
          //遍历roles
          for (const r of res.data.roles) {
            if (!(this.resources)) {
              this.resources = [];
            }
            this.resources = this.resources.concat(r.resources);
          }
            setUserInfo(JSON.stringify(userInfo));
            setUserResources(JSON.stringify(this.resources))
        for (const r of this.resources) {
src/views/dmx/knowledgeLib/config.vue
@@ -362,7 +362,7 @@
      description: kbObj.description,
      language: "English",
      permission: kbObj.permission,
      embd_id: props.kbtenantInfo.embd_id || kbObj.embd_id,
      embd_id: kbObj.embd_id || props.kbtenantInfo.embd_id,
      parser_id: kbObj.parser_id,
      layout_recognize: true,
    }