| | |
| | | </template> |
| | | <template #operations="{ record }"> |
| | | <a-space> |
| | | <a-button type="outline" @click="operation(2, record)" |
| | | >编辑</a-button |
| | | > |
| | | <a-button |
| | | type="dashed" |
| | | status="warning" |
| | |
| | | let resourcevisible = ref(false); |
| | | let selectRole = ref({}); |
| | | |
| | | let u =JSON.parse(getUserInfo()); |
| | | |
| | | const eachChildrenAdd=(node)=>{ |
| | | if (node.children?.length > 0) { |
| | |
| | | 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) => { |
| | |
| | | const MenuData = async (key) => { |
| | | await ResourceList(key).then((res) => { |
| | | let newTree = []; |
| | | let u =JSON.parse(getUserInfo()); |
| | | if (u.role != "admin") { |
| | | removeChild(res.rows, newTree); |
| | | } |
| | |
| | | }); |
| | | }; |
| | | |
| | | 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) => { |