From 11a7c77f69cc1e7dbfcf979ace8e7a9e66bfdd34 Mon Sep 17 00:00:00 2001 From: dinghao <2639919794@qq.com> Date: Fri, 24 May 2024 09:44:08 +0800 Subject: [PATCH] tijiao --- .../departmentManage/index.vue | 224 +++++++++--------- .../organizationManage/usermanage/index.vue | 14 +- 2 files changed, 118 insertions(+), 120 deletions(-) diff --git a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue index b7c2117..4918d21 100644 --- a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue +++ b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue @@ -85,9 +85,16 @@ import { Modal } from 'ant-design-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { http } from '/nerv-lib/util/http'; + import { uuid } from '@antv/x6/lib/util/string/uuid'; export default defineComponent({ - name: 'authorityManageIndex', + name: 'AuthorityManageIndex', 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([]); const UsercheckedKeys = ref([]); @@ -98,85 +105,13 @@ console.log('checkedKeys', UsercheckedKeys.value); }); - const activeKey = ref('1'); - const activeKey2 = ref('1'); - const disabled = ref(false); - const disabled2 = ref(false); - - const addApartment = () => { - disabled.value = false; + const opMap: any = { + type: 'add', + fuc: () => {}, + record: {}, }; - const addApartmentSon = () => { - disabled.value = false; - }; - const deleteApartment = () => { - Modal.confirm({ - title: '是否确认删除', - icon: createVNode(ExclamationCircleOutlined), - content: createVNode('div', { style: 'color:red;' }, ''), - onOk() {}, - onCancel() { - console.log('Cancel'); - }, - class: 'test', - }); - }; - const addUser = () => { - disabled2.value = false; - }; - - const addUserSon = () => { - disabled.value = false; - }; - const deleteUser = () => { - Modal.confirm({ - title: '是否确认删除', - icon: createVNode(ExclamationCircleOutlined), - content: createVNode('div', { style: 'color:red;' }, ''), - onOk() {}, - onCancel() { - console.log('Cancel'); - }, - class: 'test', - }); - }; - - const SelectApartmentTree = (selectedKeys: any, info: any) => { - console.log(selectedKeys, 'selectedKeys'); - console.log(info, 'info'); - }; - const SelectUserTree = (selectedKeys: any, info: any) => { - console.log(selectedKeys, 'selectedKeys'); - console.log(info, 'info'); - }; - - const ApartmentSelect = (selectedKeys: any, info: any) => { - console.log(selectedKeys, 'selectedKeys'); - console.log(info, 'info'); - }; - - const UserSelect = (selectedKeys: any, info: any) => { - console.log(selectedKeys, 'selectedKeys'); - console.log(info, 'info'); - }; - - const ApartmentSure = () => { - disabled.value = !disabled.value; - }; - const UserSure = () => { - disabled2.value = !disabled2.value; - }; - - const CancelApartment = () => { - disabled.value = true; - }; - - const CancelUser = () => { - disabled2.value = true; - }; - - const apartmentTreeData = [ + const apartmentTreeData = ref([ { title: '铁路总局', key: '0-0', @@ -185,8 +120,9 @@ { title: '临沂站', key: '0-0-1' }, ], }, - ]; - const userTreeData = [ + ]); + + const userTreeData = ref([ { title: '产品总监', key: '0-0', @@ -195,7 +131,7 @@ { title: '产品助理', key: '0-0-1' }, ], }, - ]; + ]); const apartmentAdminTreeData = [ { @@ -219,36 +155,106 @@ }, ]; - const userAdminTreeData = [ + const userAdminTreeData = ref([ { - title: '首页', + 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' }], - }, + { title: '产品经理1', key: '0-0-0' }, + { title: '产品经理2', key: '0-0-1' }, ], }, - ]; + ]); - let formData = reactive({ - department: '', - remark: '', - }); - let formData2 = reactive({ - department: '', - remark: '', - }); + const addApartment = () => { + disabled.value = false; + }; + + const addApartmentSon = () => { + disabled.value = false; + }; + + const addUser = () => { + disabled2.value = false; + }; + + const addUserSon = () => { + disabled.value = false; + }; + + const deleteApartment = () => { + Modal.confirm({ + title: '是否确认删除', + icon: createVNode(ExclamationCircleOutlined), + content: createVNode('div', { style: 'color:red;' }, ''), + onOk() {}, + onCancel() { + console.log('Cancel'); + }, + class: 'test', + }); + }; + + const deleteUser = () => { + Modal.confirm({ + title: '是否确认删除', + icon: createVNode(ExclamationCircleOutlined), + content: createVNode('div', { style: 'color:red;' }, ''), + onOk() {}, + onCancel() { + console.log('Cancel'); + }, + class: 'test', + }); + }; + + const SelectApartmentTree = (selectedKeys: any, info: any) => { + disabled.value = false; + console.log(selectedKeys, 'selectedKeys'); + console.log(info, 'info'); + }; + const SelectUserTree = (selectedKeys: any, info: any) => { + disabled2.value = false; + console.log(selectedKeys, 'selectedKeys'); + console.log(info, 'info'); + }; + + const CancelApartment = () => { + disabled.value = true; + }; + + const CancelUser = () => { + disabled2.value = true; + }; + + const ApartmentSelect = (selectedKeys: any, info: any) => { + console.log(selectedKeys, 'selectedKeys'); + console.log(info, 'info'); + }; + + const UserSelect = (selectedKeys: any, info: any) => { + console.log(selectedKeys, 'selectedKeys'); + console.log(info, 'info'); + }; + + const ApartmentSure = () => { + 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 = () => { + disabled2.value = !disabled2.value; + opMap.fuc && opMap.fuc(formData2.value); + console.log(formData2.value, 'formData2'); + userTreeData.value[0].children.push({ + title: formData2.value.departname, + key: 'a2', + }); + }; const formSchema = reactive([ { @@ -258,7 +264,7 @@ schemas: [ { label: '部门名称', - field: 'department', + field: 'name', component: 'NsInput', componentProps: { disabled: disabled, @@ -292,7 +298,7 @@ }, { label: '部门编码', - field: 'department', + field: 'code', component: 'NsInput', componentProps: { disabled: disabled, @@ -375,7 +381,7 @@ }, { label: '节点编码', - field: 'department', + field: 'code', component: 'NsInput', componentProps: { disabled: disabled2, @@ -390,7 +396,7 @@ }, { label: '是否部门领导', - field: 'sex', + field: 'isleader', component: 'NsRadioGroup', componentProps: { disabled: disabled2, diff --git a/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue b/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue index 9a10aef..5644ede 100644 --- a/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue +++ b/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue @@ -41,7 +41,7 @@
- +
{ - opMap.fuc && opMap.fuc(formData2.value); + // opMap.fuc && opMap.fuc(formData2.value); addformvisible.value = false; }; const handleClose = () => { @@ -649,8 +649,6 @@ } .left { width: 400px; - /* height: 95vh; */ - // height: 92.7vh; border-right: 5px solid rgb(229, 235, 240); min-width: fit-content; } @@ -664,17 +662,11 @@ } .ns-table-title { text-align: left; - height: 46px; + // height: 46px; line-height: 46px; font-size: 18px; font-weight: bold; - user-select: text; padding-left: 16px; - width: 100%; - } - .table { - /* width: 2000px; */ - /* width: auto; */ } .admin { text-align: left;