diff --git a/web/client/assets/images/install/appDelete.png b/web/client/assets/images/install/appDelete.png new file mode 100644 index 0000000..6df9059 Binary files /dev/null and b/web/client/assets/images/install/appDelete.png differ diff --git a/web/client/index.ejs b/web/client/index.ejs index 2fd8513..97ad9af 100644 --- a/web/client/index.ejs +++ b/web/client/index.ejs @@ -13,7 +13,7 @@ + src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_19077_5.1f8a6b254697a8ad1c955f3a19fc4dd6.es5.js">
diff --git a/web/client/src/sections/install/components/systemModal.jsx b/web/client/src/sections/install/components/systemModal.jsx index 6a03bf5..c5fdbe2 100644 --- a/web/client/src/sections/install/components/systemModal.jsx +++ b/web/client/src/sections/install/components/systemModal.jsx @@ -1,6 +1,6 @@ import React, { useState, useRef, useEffect } from "react"; import { connect } from "react-redux"; -import { Modal, Form } from "@douyinfe/semi-ui"; +import { Modal, Form, Input, Button } from "@douyinfe/semi-ui"; import { IconAlertCircle } from '@douyinfe/semi-icons'; @@ -9,31 +9,35 @@ function adminModal (props) { close, visible, dispatch, - pepList, actions, - adminEdit,//是否是编辑 - editObj, + systemEdit,//是否是编辑 + peplist,//项企项目列表 + anxincloudList,//安心云项目列表 + pepProjectId } = props; const { install } = actions; const form = useRef();//表单 - const [disablePeople, setDisablePeople] = useState(true); //页码信息 - const [peopleList, setPeopleList] = useState([]); //人员List - const [departmentId, setDepartmentId] = useState(); //部门id - const [peopleId, setPeopleId] = useState(); //人员id + const [custom, setCustom] = useState(false); //是否是自定义项目 + const [appList, setAppList] = useState([ + { + name: '', + url: '' + } + ]); //添加应用列表 //初始化 useEffect(() => { - if (editObj.id) { - let departmentList = [] - for (let i = 0; i < pepList.length; i++) { - if (pepList[i].id == editObj.departments[0].id) { - departmentList = pepList[i].users - } - } - setPeopleList(departmentList) - setDepartmentId(editObj.departments[0].id) - setPeopleId(editObj.pepUserId) - setDisablePeople(false) - } + // if (editObj.id) { + // let departmentList = [] + // for (let i = 0; i < pepList.length; i++) { + // if (pepList[i].id == editObj.departments[0].id) { + // departmentList = pepList[i].users + // } + // } + // setPeopleList(departmentList) + // setDepartmentId(editObj.departments[0].id) + // setPeopleId(editObj.pepUserId) + // setDisablePeople(false) + // } }, []); function handleOk () { @@ -42,20 +46,20 @@ function adminModal (props) { .validate() .then((values) => { if (adminEdit) { - dispatch(install.deteleOrganizationAdmin({id:editObj.id,msg:''})).then( - dispatch(install.postOrganizationUser({ role: ['admin'], pepUserId: values.pepUserId, msg: '修改管理员' })).then((res) => {//获取项企(PEP)全部部门及其下用户 - if (res.success) { - close(); - } - }) - ) + // dispatch(install.deteleOrganizationAdmin({id:editObj.id,msg:''})).then( + // dispatch(install.postOrganizationUser({ role: ['admin'], pepUserId: values.pepUserId, msg: '修改管理员' })).then((res) => {//获取项企(PEP)全部部门及其下用户 + // if (res.success) { + // close(); + // } + // }) + // ) } else { - dispatch(install.postOrganizationUser({ role: ['admin'], pepUserId: values.pepUserId, msg: '新增管理员' })).then((res) => {//获取项企(PEP)全部部门及其下用户 - if (res.success) { - close(); - } - }) + // dispatch(install.postOrganizationUser({ role: ['admin'], pepUserId: values.pepUserId, msg: '新增管理员' })).then((res) => {//获取项企(PEP)全部部门及其下用户 + // if (res.success) { + // close(); + // } + // }) } }) } @@ -63,45 +67,41 @@ function adminModal (props) { close(); //点击弹框取消 左边按钮 } + function onChange (value, index) { + console.log('value', value); + console.log('index', index); + } return ( <>