zhangxiao
2024-08-27 e426ee93a2553550766e25958dcb70a6f7339b9c
src/views/authority/role/index.vue
@@ -87,6 +87,9 @@
        </template>
        <template #operations="{ record }">
          <a-space>
            <a-button type="outline" @click="operation(2, record)"
            >编辑</a-button
            >
            <a-button
              type="dashed"
              status="warning"
@@ -338,6 +341,7 @@
  let resourcevisible = ref(false);
  let selectRole = ref({});
  let u =JSON.parse(getUserInfo());
  const eachChildrenAdd=(node)=>{
    if (node.children?.length > 0) {
@@ -580,6 +584,14 @@
      editform.value.remark = "";
    }
    if (t == 2) {
      visible.value = true;
      formRef.value?.resetFields();
      save.value = '编辑';
      editform.value.roleId=record.roleId
      editform.value.roleName = record.roleName;
    }
    //删除
    if (t == 3) {
      await RoleDelete(record.roleId).then((res) => {
@@ -696,7 +708,6 @@
  const MenuData = async (key) => {
    await ResourceList(key).then((res) => {
      let newTree = [];
      let u =JSON.parse(getUserInfo());
      if (u.role != "admin") {
        removeChild(res.rows, newTree);
      }
@@ -704,11 +715,11 @@
    });
  };
  KnowledgeList().then((res) => {
  KnowledgeList(u.role).then((res) => {
    knowledgeList.value = res.data;
  });
  DialogList().then((res) => {
  DialogList(u.role).then((res) => {
    DialogsList.value = res.data;
  });
  queryCanvasList(null).then((canvas) => {