xuziqiang 6 months ago
parent
commit
1e72487b35
  1. 200
      hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue
  2. 14
      hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue

200
hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue

@ -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,

14
hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue

@ -41,7 +41,7 @@
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" class="table" /> <ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" />
</div> </div>
<a-drawer <a-drawer
:width="1200" :width="1200"
@ -157,7 +157,7 @@
}; };
const handleOk = () => { const handleOk = () => {
opMap.fuc && opMap.fuc(formData2.value); // opMap.fuc && opMap.fuc(formData2.value);
addformvisible.value = false; addformvisible.value = false;
}; };
const handleClose = () => { const handleClose = () => {
@ -646,8 +646,6 @@
} }
.left { .left {
width: 400px; width: 400px;
/* height: 95vh; */
// height: 92.7vh;
border-right: 5px solid rgb(229, 235, 240); border-right: 5px solid rgb(229, 235, 240);
min-width: fit-content; min-width: fit-content;
} }
@ -661,17 +659,11 @@
} }
.ns-table-title { .ns-table-title {
text-align: left; text-align: left;
height: 46px; // height: 46px;
line-height: 46px; line-height: 46px;
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
user-select: text;
padding-left: 16px; padding-left: 16px;
width: 100%;
}
.table {
/* width: 2000px; */
/* width: auto; */
} }
.admin { .admin {
text-align: left; text-align: left;

Loading…
Cancel
Save