|
@ -85,9 +85,16 @@ |
|
|
import { Modal } from 'ant-design-vue'; |
|
|
import { Modal } from 'ant-design-vue'; |
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; |
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; |
|
|
import { http } from '/nerv-lib/util/http'; |
|
|
import { http } from '/nerv-lib/util/http'; |
|
|
|
|
|
import { uuid } from '@antv/x6/lib/util/string/uuid'; |
|
|
export default defineComponent({ |
|
|
export default defineComponent({ |
|
|
name: 'authorityManageIndex', |
|
|
name: 'AuthorityManageIndex', |
|
|
setup() { |
|
|
setup() { |
|
|
|
|
|
let formData = ref({}); |
|
|
|
|
|
let formData2 = ref({}); |
|
|
|
|
|
const activeKey = ref('1'); |
|
|
|
|
|
const activeKey2 = ref('1'); |
|
|
|
|
|
const disabled = ref(true); |
|
|
|
|
|
const disabled2 = ref(true); |
|
|
const ApartcheckedKeys = ref<string[]>([]); |
|
|
const ApartcheckedKeys = ref<string[]>([]); |
|
|
const UsercheckedKeys = ref<string[]>([]); |
|
|
const UsercheckedKeys = ref<string[]>([]); |
|
|
|
|
|
|
|
@ -98,10 +105,66 @@ |
|
|
console.log('checkedKeys', UsercheckedKeys.value); |
|
|
console.log('checkedKeys', UsercheckedKeys.value); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const activeKey = ref('1'); |
|
|
const opMap: any = { |
|
|
const activeKey2 = ref('1'); |
|
|
type: 'add', |
|
|
const disabled = ref(false); |
|
|
fuc: () => {}, |
|
|
const disabled2 = ref(false); |
|
|
record: {}, |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const apartmentTreeData = ref([ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '铁路总局', |
|
|
|
|
|
key: '0-0', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ title: '济阳站', key: '0-0-0' }, |
|
|
|
|
|
{ title: '临沂站', key: '0-0-1' }, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
const userTreeData = ref([ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '产品总监', |
|
|
|
|
|
key: '0-0', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ title: '产品经理', key: '0-0-0' }, |
|
|
|
|
|
{ title: '产品助理', key: '0-0-1' }, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
const apartmentAdminTreeData = [ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '首页', |
|
|
|
|
|
key: '0-0', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '控制台', |
|
|
|
|
|
key: '0-0-0', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ title: 'leaf', key: '0-0-0-0' }, |
|
|
|
|
|
{ title: 'leaf', key: '0-0-0-1' }, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '用户管理', |
|
|
|
|
|
key: '0-0-1', |
|
|
|
|
|
children: [{ key: '0-0-1-0', title: 'sss' }], |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
const userAdminTreeData = ref([ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '产品总监', |
|
|
|
|
|
key: '0-0', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ title: '产品经理1', key: '0-0-0' }, |
|
|
|
|
|
{ title: '产品经理2', key: '0-0-1' }, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
]); |
|
|
|
|
|
|
|
|
const addApartment = () => { |
|
|
const addApartment = () => { |
|
|
disabled.value = false; |
|
|
disabled.value = false; |
|
@ -110,6 +173,15 @@ |
|
|
const addApartmentSon = () => { |
|
|
const addApartmentSon = () => { |
|
|
disabled.value = false; |
|
|
disabled.value = false; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const addUser = () => { |
|
|
|
|
|
disabled2.value = false; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const addUserSon = () => { |
|
|
|
|
|
disabled.value = false; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const deleteApartment = () => { |
|
|
const deleteApartment = () => { |
|
|
Modal.confirm({ |
|
|
Modal.confirm({ |
|
|
title: '是否确认删除', |
|
|
title: '是否确认删除', |
|
@ -122,13 +194,7 @@ |
|
|
class: 'test', |
|
|
class: 'test', |
|
|
}); |
|
|
}); |
|
|
}; |
|
|
}; |
|
|
const addUser = () => { |
|
|
|
|
|
disabled2.value = false; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const addUserSon = () => { |
|
|
|
|
|
disabled.value = false; |
|
|
|
|
|
}; |
|
|
|
|
|
const deleteUser = () => { |
|
|
const deleteUser = () => { |
|
|
Modal.confirm({ |
|
|
Modal.confirm({ |
|
|
title: '是否确认删除', |
|
|
title: '是否确认删除', |
|
@ -143,14 +209,24 @@ |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const SelectApartmentTree = (selectedKeys: any, info: any) => { |
|
|
const SelectApartmentTree = (selectedKeys: any, info: any) => { |
|
|
|
|
|
disabled.value = false; |
|
|
console.log(selectedKeys, 'selectedKeys'); |
|
|
console.log(selectedKeys, 'selectedKeys'); |
|
|
console.log(info, 'info'); |
|
|
console.log(info, 'info'); |
|
|
}; |
|
|
}; |
|
|
const SelectUserTree = (selectedKeys: any, info: any) => { |
|
|
const SelectUserTree = (selectedKeys: any, info: any) => { |
|
|
|
|
|
disabled2.value = false; |
|
|
console.log(selectedKeys, 'selectedKeys'); |
|
|
console.log(selectedKeys, 'selectedKeys'); |
|
|
console.log(info, 'info'); |
|
|
console.log(info, 'info'); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const CancelApartment = () => { |
|
|
|
|
|
disabled.value = true; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const CancelUser = () => { |
|
|
|
|
|
disabled2.value = true; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const ApartmentSelect = (selectedKeys: any, info: any) => { |
|
|
const ApartmentSelect = (selectedKeys: any, info: any) => { |
|
|
console.log(selectedKeys, 'selectedKeys'); |
|
|
console.log(selectedKeys, 'selectedKeys'); |
|
|
console.log(info, 'info'); |
|
|
console.log(info, 'info'); |
|
@ -163,92 +239,22 @@ |
|
|
|
|
|
|
|
|
const ApartmentSure = () => { |
|
|
const ApartmentSure = () => { |
|
|
disabled.value = !disabled.value; |
|
|
disabled.value = !disabled.value; |
|
|
|
|
|
opMap.fuc && opMap.fuc(formData.value); |
|
|
|
|
|
console.log(formData.value.name, 'formData'); |
|
|
|
|
|
apartmentTreeData.value[0].children.push({ |
|
|
|
|
|
title: formData.value.name, |
|
|
|
|
|
key: 'a1', |
|
|
|
|
|
}); |
|
|
}; |
|
|
}; |
|
|
const UserSure = () => { |
|
|
const UserSure = () => { |
|
|
disabled2.value = !disabled2.value; |
|
|
disabled2.value = !disabled2.value; |
|
|
}; |
|
|
opMap.fuc && opMap.fuc(formData2.value); |
|
|
|
|
|
console.log(formData2.value, 'formData2'); |
|
|
const CancelApartment = () => { |
|
|
userTreeData.value[0].children.push({ |
|
|
disabled.value = true; |
|
|
title: formData2.value.departname, |
|
|
}; |
|
|
key: 'a2', |
|
|
|
|
|
|
|
|
const CancelUser = () => { |
|
|
|
|
|
disabled2.value = true; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const apartmentTreeData = [ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '铁路总局', |
|
|
|
|
|
key: '0-0', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ title: '济阳站', key: '0-0-0' }, |
|
|
|
|
|
{ title: '临沂站', key: '0-0-1' }, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
|
|
|
const userTreeData = [ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '产品总监', |
|
|
|
|
|
key: '0-0', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ title: '产品经理', key: '0-0-0' }, |
|
|
|
|
|
{ title: '产品助理', key: '0-0-1' }, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
const apartmentAdminTreeData = [ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '首页', |
|
|
|
|
|
key: '0-0', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '控制台', |
|
|
|
|
|
key: '0-0-0', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ title: 'leaf', key: '0-0-0-0' }, |
|
|
|
|
|
{ title: 'leaf', key: '0-0-0-1' }, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '用户管理', |
|
|
|
|
|
key: '0-0-1', |
|
|
|
|
|
children: [{ key: '0-0-1-0', title: 'sss' }], |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
const userAdminTreeData = [ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '首页', |
|
|
|
|
|
key: '0-0', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '工作台', |
|
|
|
|
|
key: '0-0-0', |
|
|
|
|
|
children: [ |
|
|
|
|
|
{ title: 'leaf', key: '0-0-0-0' }, |
|
|
|
|
|
{ title: 'leaf', key: '0-0-0-1' }, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '系统管理', |
|
|
|
|
|
key: '0-0-1', |
|
|
|
|
|
children: [{ key: '0-0-1-0', title: 'sss' }], |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
let formData = reactive({ |
|
|
|
|
|
department: '', |
|
|
|
|
|
remark: '', |
|
|
|
|
|
}); |
|
|
|
|
|
let formData2 = reactive({ |
|
|
|
|
|
department: '', |
|
|
|
|
|
remark: '', |
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const formSchema = reactive([ |
|
|
const formSchema = reactive([ |
|
|
{ |
|
|
{ |
|
@ -258,7 +264,7 @@ |
|
|
schemas: [ |
|
|
schemas: [ |
|
|
{ |
|
|
{ |
|
|
label: '部门名称', |
|
|
label: '部门名称', |
|
|
field: 'department', |
|
|
field: 'name', |
|
|
component: 'NsInput', |
|
|
component: 'NsInput', |
|
|
componentProps: { |
|
|
componentProps: { |
|
|
disabled: disabled, |
|
|
disabled: disabled, |
|
@ -292,7 +298,7 @@ |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '部门编码', |
|
|
label: '部门编码', |
|
|
field: 'department', |
|
|
field: 'code', |
|
|
component: 'NsInput', |
|
|
component: 'NsInput', |
|
|
componentProps: { |
|
|
componentProps: { |
|
|
disabled: disabled, |
|
|
disabled: disabled, |
|
@ -375,7 +381,7 @@ |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '节点编码', |
|
|
label: '节点编码', |
|
|
field: 'department', |
|
|
field: 'code', |
|
|
component: 'NsInput', |
|
|
component: 'NsInput', |
|
|
componentProps: { |
|
|
componentProps: { |
|
|
disabled: disabled2, |
|
|
disabled: disabled2, |
|
@ -390,7 +396,7 @@ |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '是否部门领导', |
|
|
label: '是否部门领导', |
|
|
field: 'sex', |
|
|
field: 'isleader', |
|
|
component: 'NsRadioGroup', |
|
|
component: 'NsRadioGroup', |
|
|
componentProps: { |
|
|
componentProps: { |
|
|
disabled: disabled2, |
|
|
disabled: disabled2, |
|
|