shaogen1995 1 день назад
Родитель
Сommit
ba09fcd6a3
44 измененных файлов с 1716 добавлено и 616 удалено
  1. 15 0
      src/assets/styles/base.less
  2. 1 1
      src/components/Z3upFiles/index.tsx
  3. 58 0
      src/pages/Isystem/I4processSet/I4edit/index.module.scss
  4. 110 0
      src/pages/Isystem/I4processSet/I4edit/index.tsx
  5. 205 0
      src/pages/Isystem/I4processSet/I4linkSet/I4addPro.tsx
  6. 48 0
      src/pages/Isystem/I4processSet/I4linkSet/I4lookPro.tsx
  7. 94 0
      src/pages/Isystem/I4processSet/I4linkSet/index.module.scss
  8. 124 0
      src/pages/Isystem/I4processSet/I4linkSet/index.tsx
  9. 44 0
      src/pages/Isystem/I4processSet/data.ts
  10. 18 0
      src/pages/Isystem/I4processSet/index.module.scss
  11. 161 2
      src/pages/Isystem/I4processSet/index.tsx
  12. 2 3
      src/pages/Isystem/I6role/I6edit.tsx
  13. 7 6
      src/pages/Isystem/I6role/index.module.scss
  14. 34 0
      src/pages/Isystem/I7user/I7add/index.module.scss
  15. 221 0
      src/pages/Isystem/I7user/I7add/index.tsx
  16. 43 0
      src/pages/Isystem/I7user/data.ts
  17. 19 0
      src/pages/Isystem/I7user/index.module.scss
  18. 227 2
      src/pages/Isystem/I7user/index.tsx
  19. 11 0
      src/pages/Isystem/I8log/data.ts
  20. 1 1
      src/pages/Z2log/index.module.scss
  21. 8 8
      src/pages/Z2log/index.tsx
  22. 32 3
      src/pages/Layout/data.ts
  23. 1 2
      src/pages/Layout/index.tsx
  24. 0 19
      src/pages/Z1user/UserAdd/index.module.scss
  25. 0 134
      src/pages/Z1user/UserAdd/index.tsx
  26. 0 87
      src/pages/Z1user/index.module.scss
  27. 0 189
      src/pages/Z1user/index.tsx
  28. 62 0
      src/store/action/Isystem/I4processSet.ts
  29. 7 20
      src/store/action/Z1user.ts
  30. 17 0
      src/store/action/Isystem/I8log.ts
  31. 0 17
      src/store/action/Z2log.ts
  32. 25 0
      src/store/reducer/Isystem/I4processSet.ts
  33. 28 0
      src/store/reducer/Isystem/I7user.ts
  34. 10 10
      src/store/reducer/Z2log.ts
  35. 0 28
      src/store/reducer/Z1user.ts
  36. 6 4
      src/store/reducer/index.ts
  37. 1 1
      src/store/reducer/layout.ts
  38. 0 31
      src/types/api/Z1user.d.ts
  39. 0 11
      src/types/api/Z2log.d.ts
  40. 0 29
      src/types/api/layot.d.ts
  41. 0 3
      src/types/index.d.ts
  42. 56 0
      src/utils/dataChange.ts
  43. 2 2
      src/utils/storage.ts
  44. 18 3
      src/utils/tableData.ts

+ 15 - 0
src/assets/styles/base.less

@@ -306,3 +306,18 @@ textarea {
     border-color: #ccc !important;
   }
 }
+// .ant-table-placeholder {
+//   background-color: transparent !important;
+//   .ant-empty-description {
+//     color: var(--themeColor) !important;
+//   }
+//   ellipse {
+//     fill: var(--boxBcaColor) !important;
+//   }
+//   path {
+//     fill: transparent !important;
+//   }
+//   g {
+//     stroke: var(--themeColor) !important;
+//   }
+// }

+ 1 - 1
src/components/Z3upFiles/index.tsx

@@ -1,6 +1,5 @@
 import React, { useCallback, useRef, useState } from 'react'
 import styles from './index.module.scss'
-import { FileImgListType } from '@/types'
 import { API_upFile } from '@/store/action/layout'
 import { MessageFu } from '@/utils/message'
 import { fileDomInitialFu } from '@/utils/domShow'
@@ -24,6 +23,7 @@ import {
   arrayMove
 } from '@dnd-kit/sortable'
 import { CSS } from '@dnd-kit/utilities'
+import { FileImgListType } from '@/pages/Layout/data'
 
 type Props = {
   isLook: boolean // 是否是查看

+ 58 - 0
src/pages/Isystem/I4processSet/I4edit/index.module.scss

@@ -0,0 +1,58 @@
+.I4edit {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 2;
+  background-color: var(--boxBcaColor);
+  border-radius: 10px;
+  :global {
+    .I4main {
+      width: 100%;
+      height: 100%;
+      overflow-y: auto;
+      padding: 24px;
+      .I4RowBox {
+        font-size: 16px;
+        .I4row {
+          width: 50%;
+          margin-bottom: 20px;
+          display: flex;
+          .I4row1 {
+            width: 100px;
+            text-align: right;
+            font-weight: 700;
+            & > span {
+              color: #ff4d4f;
+            }
+          }
+          .I4row1_2 {
+            position: relative;
+            top: 4px;
+          }
+          .I4row2 {
+            width: calc(100% - 100px);
+          }
+        }
+        .I4row2 {
+          flex-direction: column;
+          justify-content: space-around;
+          .I4rowhh {
+            width: 100%;
+            display: flex;
+          }
+        }
+      }
+    }
+    .I4btn {
+      margin-top: 30px;
+      padding-left: 20px;
+      // position: absolute;
+      // top: 50%;
+      // right: 5%;
+      // transform: translateY(-50%);
+      // z-index: 10;
+    }
+  }
+}

+ 110 - 0
src/pages/Isystem/I4processSet/I4edit/index.tsx

@@ -0,0 +1,110 @@
+import React, { useCallback, useEffect, useState } from 'react'
+import styles from './index.module.scss'
+import { Button, Radio } from 'antd'
+import TextArea from 'antd/es/input/TextArea'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { MessageFu } from '@/utils/message'
+import { I4tableType } from '../data'
+import { I4_APIgetInfo, I4_APIsave } from '@/store/action/Isystem/I4processSet'
+
+type Props = {
+  sId: number
+  closeFu: () => void
+  succFu: () => void
+}
+
+function I4edit({ sId, closeFu, succFu }: Props) {
+  const [info, setInfo] = useState({} as I4tableType)
+
+  const getInfoFu = useCallback(async (id: number) => {
+    const res = await I4_APIgetInfo(id)
+    if (res.code === 0) {
+      const data: I4tableType = res.data
+      setInfo({
+        ...data
+      })
+    }
+  }, [])
+
+  useEffect(() => {
+    getInfoFu(sId)
+  }, [getInfoFu, sId])
+
+  const formChange = useCallback(
+    (key: 'enabled' | 'remark', val: any) => {
+      setInfo({
+        ...info,
+        [key]: val
+      })
+    },
+    [info]
+  )
+
+  // 点击确定
+  const btnOk = useCallback(async () => {
+    const obj = {
+      ...info
+    }
+
+    const res = await I4_APIsave(obj)
+    if (res.code === 0) {
+      MessageFu.success('编辑成功')
+      succFu()
+      closeFu()
+    }
+  }, [closeFu, info, succFu])
+
+  return (
+    <div className={styles.I4edit}>
+      <div className='I4main'>
+        <div className='I4RowBox'>
+          <div className='I4row'>
+            <div className='I4row1'>流程名称:</div>
+            <div className='I4row2'>{info.name}</div>
+          </div>
+
+          <div className='I4row'>
+            <div className='I4row1'>
+              <span> * </span> 流程状态:
+            </div>
+            <div className='I4row2'>
+              <Radio checked={info.enabled === 1} onClick={() => formChange('enabled', 1)}>
+                启用
+              </Radio>
+              &emsp;
+              <Radio checked={info.enabled === 0} onClick={() => formChange('enabled', 0)}>
+                禁用
+              </Radio>
+            </div>
+          </div>
+
+          <div className='I4row'>
+            <div className='I4row1'>流程说明:</div>
+            <div className='I4row2'>
+              <TextArea
+                maxLength={500}
+                showCount
+                placeholder='请输入内容'
+                value={info.remark}
+                onChange={e => formChange('remark', e.target.value)}
+              />
+            </div>
+          </div>
+        </div>
+
+        {/* 右侧按钮 */}
+        <div className='I4btn'>
+          <Button type='primary' onClick={btnOk}>
+            保存
+          </Button>{' '}
+          &emsp;
+          <MyPopconfirm txtK='取消' onConfirm={closeFu} />
+        </div>
+      </div>
+    </div>
+  )
+}
+
+const MemoI4edit = React.memo(I4edit)
+
+export default MemoI4edit

+ 205 - 0
src/pages/Isystem/I4processSet/I4linkSet/I4addPro.tsx

@@ -0,0 +1,205 @@
+import React, { useCallback, useEffect, useState } from 'react'
+import styles from './index.module.scss'
+import { Button, Input, InputNumber, Modal, Radio, Select } from 'antd'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { useDispatch, useSelector } from 'react-redux'
+import { RootState } from '@/store'
+import { MessageFu } from '@/utils/message'
+import { I4proListType } from '../data'
+import { UserTableListType } from '../../I7user/data'
+import { I4_APIgetProInfo, I4_APIgetProSave } from '@/store/action/Isystem/I4processSet'
+import { I6_APIgetList } from '@/store/action/Isystem/I6role'
+
+const baseFormData = {
+  id: -1,
+  name: '',
+  type: '',
+  sort: 999
+} as I4proListType
+
+type Props = {
+  sId: number
+  closeFu: () => void
+  succFu: () => void
+  userList: UserTableListType[]
+  flowId: number
+}
+
+function I4addPro({ sId, closeFu, succFu, userList, flowId }: Props) {
+  const dispatch = useDispatch()
+  // 获取角色列表
+  const { list: roleList } = useSelector((state: RootState) => state.I6role.tableInfo)
+
+  const [form, setForm] = useState(baseFormData)
+
+  const getInfoFu = useCallback(async (id: number) => {
+    const res = await I4_APIgetProInfo(id)
+    if (res.code === 0) {
+      const data: I4proListType = res.data
+
+      let moduleIds: any = data.moduleIds.split(',')
+
+      data.type === 'user'
+        ? setIdsArr1(moduleIds.map((v: any) => Number(v)))
+        : setIdsArr2(moduleIds.map((v: any) => Number(v)))
+
+      setForm(data)
+    }
+  }, [])
+
+  useEffect(() => {
+    dispatch(I6_APIgetList({ pageNum: 1, pageSize: 99999 }))
+
+    if (sId > 0) getInfoFu(sId)
+    else {
+      setForm({ ...baseFormData, type: 'user' })
+    }
+  }, [dispatch, getInfoFu, sId])
+
+  const formChange = useCallback(
+    (key: 'name' | 'type' | 'sort', val: any) => {
+      setForm({
+        ...form,
+        [key]: val
+      })
+    },
+    [form]
+  )
+
+  const [idsArr1, setIdsArr1] = useState<string[]>([])
+  const [idsArr2, setIdsArr2] = useState<string[]>([])
+
+  // 点击提交
+  const btnOk = useCallback(async () => {
+    if (!form.name) return MessageFu.warning('请输入节点名称')
+    if (!form.sort) return MessageFu.warning('请输入正整数排序值')
+
+    const id1 = (idsArr1 || []).join(',')
+
+    if (form.type === 'user' && !id1) return MessageFu.warning('请选择指定用户')
+
+    const id2 = (idsArr2 || []).join(',')
+
+    if (form.type === 'role' && !id2) return MessageFu.warning('请选择角色')
+
+    const obj = {
+      ...form,
+      moduleIds: form.type === 'user' ? id1 : id2,
+      id: sId > 0 ? sId : null,
+      flowId
+    }
+
+    const res = await I4_APIgetProSave(obj)
+
+    if (res.code === 0) {
+      MessageFu.success(sId > 0 ? '编辑成功' : '新增成功')
+      succFu()
+      closeFu()
+    }
+  }, [closeFu, flowId, form, idsArr1, idsArr2, sId, succFu])
+
+  return (
+    <Modal
+      wrapClassName={styles.I4addPro}
+      destroyOnClose
+      open={true}
+      title={sId > 0 ? '编辑' : '新增'}
+      footer={
+        [] // 设置footer为空,去掉 取消 确定默认按钮
+      }
+    >
+      <div className='I4aRow'>
+        <div className='I4aRowll'>
+          <span> * </span> 节点名称:
+        </div>
+        <div className='I4aRowrr'>
+          <Input
+            placeholder='请输入内容'
+            maxLength={10}
+            showCount
+            value={form.name}
+            onChange={e => formChange('name', e.target.value.trim())}
+          />
+        </div>
+      </div>
+
+      <div className='I4aRow'>
+        <div className='I4aRowll'>
+          <span> * </span> 办理人:
+        </div>
+        <div className='I4aRowrr'>
+          <Radio.Group
+            value={form.type}
+            onChange={e => formChange('type', e.target.value)}
+            options={[
+              { value: 'user', label: '指定用户' },
+              { value: 'role', label: '按角色' }
+            ]}
+          />
+        </div>
+      </div>
+
+      <div className='I4aRow'>
+        <div className='I4aRowll'></div>
+
+        <div className='I4aRowrr' hidden={form.type !== 'user'}>
+          <Select
+            showSearch={false}
+            mode='multiple'
+            allowClear
+            style={{ width: '100%' }}
+            placeholder='请选择'
+            value={idsArr1}
+            onChange={value => setIdsArr1(value)}
+            options={userList}
+            fieldNames={{ value: 'id', label: 'realName' }}
+          />
+        </div>
+        <div className='I4aRowrr' hidden={form.type !== 'role'}>
+          <Select
+            showSearch={false}
+            mode='multiple'
+            allowClear
+            style={{ width: '100%' }}
+            placeholder='请选择'
+            value={idsArr2}
+            onChange={value => setIdsArr2(value)}
+            options={roleList}
+            fieldNames={{ value: 'id', label: 'roleName' }}
+          />
+        </div>
+      </div>
+
+      <div className='I4aRow'>
+        <div className='I4aRowll'>
+          <span> * </span> 排序值:
+        </div>
+        <div className='I4aRowrr'>
+          <InputNumber
+            min={1}
+            max={999}
+            precision={0}
+            placeholder='请输入'
+            value={form.sort}
+            onChange={e => formChange('sort', e)}
+          />
+          <div className='fromRowTit'>
+            请输入1~999的数字。数字越小,排序越靠前。数字相同时,更新发布的内容排在前面
+          </div>
+        </div>
+      </div>
+
+      <div className='I4aBtn'>
+        <Button type='primary' onClick={btnOk}>
+          提交
+        </Button>
+        &emsp;
+        <MyPopconfirm txtK='取消' onConfirm={closeFu} />
+      </div>
+    </Modal>
+  )
+}
+
+const MemoI4addPro = React.memo(I4addPro)
+
+export default MemoI4addPro

+ 48 - 0
src/pages/Isystem/I4processSet/I4linkSet/I4lookPro.tsx

@@ -0,0 +1,48 @@
+import React, { useCallback, useEffect, useState } from 'react'
+import styles from './index.module.scss'
+import { Button, Modal } from 'antd'
+import { I4_APIgetProGetUser } from '@/store/action/Isystem/I4processSet'
+
+type Props = {
+  sId: number
+  closeFu: () => void
+}
+
+function I4lookPro({ sId, closeFu }: Props) {
+  const [list, setList] = useState<string[]>([])
+
+  const getInfoFu = useCallback(async () => {
+    const res = await I4_APIgetProGetUser(sId)
+    if (res.code === 0) {
+      setList((res.data || []).map((v: any) => v.realName))
+    }
+  }, [sId])
+
+  useEffect(() => {
+    getInfoFu()
+  }, [getInfoFu])
+
+  return (
+    <Modal
+      wrapClassName={styles.I4lookPro}
+      destroyOnClose
+      open={true}
+      title='查看办理人'
+      footer={
+        [] // 设置footer为空,去掉 取消 确定默认按钮
+      }
+    >
+      <div className='I4lMain'>
+        {list.length ? list.map(v => <span key={v}>{v}</span>) : <span>暂无</span>}
+      </div>
+
+      <div className='I4lBtn'>
+        <Button onClick={closeFu}>关闭</Button>
+      </div>
+    </Modal>
+  )
+}
+
+const MemoI4lookPro = React.memo(I4lookPro)
+
+export default MemoI4lookPro

+ 94 - 0
src/pages/Isystem/I4processSet/I4linkSet/index.module.scss

@@ -0,0 +1,94 @@
+.I4linkSet {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  border-radius: 10px;
+  background-color: var(--boxBcaColor);
+  padding: 24px;
+  :global {
+    .I4aTit {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      margin-bottom: 15px;
+      h3 {
+        font-size: 16px;
+      }
+    }
+    .ant-table-cell {
+      padding: 8px !important;
+    }
+  }
+}
+
+// 环节的新增/编辑弹窗
+.I4addPro {
+  :global {
+    .ant-modal-close {
+      display: none;
+    }
+
+    .ant-modal {
+      width: 800px !important;
+    }
+    .ant-modal-body {
+      border-top: 1px solid #ccc;
+      .I4aRow {
+        margin-top: 20px;
+        display: flex;
+        align-items: center;
+        .I4aRowll {
+          width: 90px;
+          text-align: right;
+          font-weight: 700;
+          & > span {
+            color: #ff4d4f;
+          }
+        }
+        .I4aRowrr {
+          width: calc(100% - 90px);
+          position: relative;
+          .fromRowTit {
+            position: absolute;
+            left: 100px;
+            top: 5px;
+            color: #999;
+            font-size: 12px;
+          }
+        }
+      }
+      .I4aBtn {
+        margin-top: 30px;
+        text-align: center;
+      }
+    }
+  }
+}
+
+// 查看办理人
+.I4lookPro {
+  :global {
+    .ant-modal-close {
+      display: none;
+    }
+
+    .ant-modal-body {
+      border-top: 1px solid #ccc;
+
+      .I4lMain {
+        margin-top: 15px;
+        & > span {
+          display: inline-block;
+          margin: 0 15px 15px;
+          font-size: 16px;
+        }
+      }
+      .I4lBtn {
+        margin-top: 15px;
+        text-align: center;
+      }
+    }
+  }
+}

+ 124 - 0
src/pages/Isystem/I4processSet/I4linkSet/index.tsx

@@ -0,0 +1,124 @@
+import React, { useCallback, useEffect, useMemo, useState } from 'react'
+import styles from './index.module.scss'
+import { Button } from 'antd'
+import MyTable from '@/components/MyTable'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { MessageFu } from '@/utils/message'
+import { UserTableListType } from '../../I7user/data'
+import { I4proListType } from '../data'
+import { I4_APIgetProDel, I4_APIgetProList } from '@/store/action/Isystem/I4processSet'
+import { I4tableC2 } from '@/utils/tableData'
+import I4addPro from './I4addPro'
+import I4lookPro from './I4lookPro'
+
+type Props = {
+  sId: number
+  closeFu: () => void
+  userList: UserTableListType[]
+  title: string
+}
+
+function I4linkSet({ sId, closeFu, userList, title }: Props) {
+  const [table, setTable] = useState<I4proListType[]>([])
+
+  const getListFu = useCallback(async () => {
+    const res = await I4_APIgetProList(sId)
+    if (res.code === 0) {
+      const data: I4proListType[] = res.data
+
+      setTable(
+        data.map((v, i) => ({
+          ...v,
+          sort: v.isUse === 0 ? '/' : v.sort,
+          type: v.isUse === 0 ? '/' : v.type
+        }))
+      )
+    }
+  }, [sId])
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu])
+
+  // 点击删除
+  const delTableFu = useCallback(
+    async (id: number) => {
+      const res: any = await I4_APIgetProDel(id)
+      if (res.code === 0) {
+        MessageFu.success('删除成功!')
+        getListFu()
+      }
+    },
+    [getListFu]
+  )
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: I4proListType, _: any, index: number) => {
+          return item.isUse === 0 ? (
+            '/'
+          ) : (
+            <>
+              <Button size='small' type='text' onClick={() => setLookId(item.id)}>
+                查看办理人
+              </Button>
+              <Button size='small' type='text' onClick={() => setProId(item.id)}>
+                编辑
+              </Button>
+              <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item.id)} />
+            </>
+          )
+        }
+      }
+    ]
+  }, [delTableFu])
+
+  // 环节的新增和编辑
+  const [proId, setProId] = useState(0)
+
+  // 查看办理人
+  const [lookId, setLookId] = useState(0)
+
+  return (
+    <div className={styles.I4linkSet}>
+      <div className='I4aTit'>
+        <h3>{title} - 环节配置</h3>
+        <div>
+          <Button type='primary' onClick={() => setProId(-1)}>
+            新增
+          </Button>
+          &emsp;
+          <Button onClick={closeFu}>返回</Button>
+        </div>
+      </div>
+
+      {/* 表格 */}
+      <MyTable
+        classKey='I4linkSet'
+        yHeight={690}
+        list={table}
+        columnsTemp={I4tableC2}
+        lastBtn={tableLastBtn}
+        pagingInfo={false}
+      />
+
+      {proId ? (
+        <I4addPro
+          flowId={sId}
+          sId={proId}
+          closeFu={() => setProId(0)}
+          succFu={getListFu}
+          userList={userList}
+        />
+      ) : null}
+
+      {lookId ? <I4lookPro sId={lookId} closeFu={() => setLookId(0)} /> : null}
+    </div>
+  )
+}
+
+const MemoI4linkSet = React.memo(I4linkSet)
+
+export default MemoI4linkSet

+ 44 - 0
src/pages/Isystem/I4processSet/data.ts

@@ -0,0 +1,44 @@
+// 外层列表发送请求
+export type I4formType = {
+  enabled: null | 0 | 1
+  name: string
+  type: string | null
+}
+
+// 外层列表
+export type I4tableType = {
+  copyUserIds: string
+  createTime: string
+  creatorId?: any
+  creatorName: string
+  enabled: number
+  id: number
+  isCopy: number
+  name: string
+  process?: any
+  remark: string
+  type: string
+  typeKey: string
+  updateTime: string
+}
+
+// 环节配置列表
+export type I4proListType = {
+  createTime: string
+  creatorId?: any
+  creatorName: string
+  flowId: number
+  id: number
+  isUse: number
+  moduleIds: string
+  name: string
+  sort: number | string
+  type: string
+  updateTime: string
+}
+
+export const I4baseFormData: I4formType = {
+  enabled: null,
+  name: '',
+  type: null
+}

+ 18 - 0
src/pages/Isystem/I4processSet/index.module.scss

@@ -1,4 +1,22 @@
 .I4processSet {
   :global {
+    .I4top {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      border-radius: 10px;
+      padding: 15px 24px;
+      background-color: var(--boxBcaColor);
+      .ant-select-selection-placeholder {
+        color: black;
+      }
+    }
+    .tableBox {
+      border-radius: 10px;
+      overflow: hidden;
+      margin-top: 15px;
+      height: calc(100% - 77px);
+      background-color: var(--boxBcaColor);
+    }
   }
 }

+ 161 - 2
src/pages/Isystem/I4processSet/index.tsx

@@ -1,9 +1,168 @@
-import React from 'react'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
 import styles from './index.module.scss'
+import { useDispatch, useSelector } from 'react-redux'
+import { RootState } from '@/store'
+import { Button, Input, Select } from 'antd'
+import MyTable from '@/components/MyTable'
+import { getUserListAPI } from '@/store/action/Isystem/I7user'
+import { I4baseFormData, I4tableType } from './data'
+import { I4_APIgetList } from '@/store/action/Isystem/I4processSet'
+import { selectObj } from '@/utils/dataChange'
+import { I4tableC } from '@/utils/tableData'
+import I4edit from './I4edit'
+import I4linkSet from './I4linkSet'
+
 function I4processSet() {
+  const dispatch = useDispatch()
+
+  // 获取用户列表
+  useEffect(() => {
+    dispatch(getUserListAPI({ pageNum: 1, pageSize: 99999 }))
+  }, [dispatch])
+
+  const { list: userList } = useSelector((state: RootState) => state.I7user.tableInfo)
+
+  const [formData, setFormData] = useState(I4baseFormData)
+  const formDataRef = useRef(I4baseFormData)
+
+  useEffect(() => {
+    formDataRef.current = formData
+  }, [formData])
+
+  // 点击搜索的 时间戳
+  const [timeKey, setTimeKey] = useState(0)
+
+  // 点击搜索
+  const clickSearch = useCallback(() => {
+    setFormData({ ...formData })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [formData])
+
+  // 封装发送请求的函数
+  const getListFu = useCallback(() => {
+    dispatch(I4_APIgetList(formDataRef.current))
+  }, [dispatch])
+
+  // 从仓库中获取数据
+  const { tableList } = useSelector((state: RootState) => state.I4processSet)
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu, timeKey])
+
+  // 输入框的改变
+  const txtChangeFu = useCallback(
+    (txt: string, key: 'name') => {
+      setFormData({
+        ...formData,
+        [key]: txt
+      })
+    },
+    [formData]
+  )
+
+  // 点击重置
+  const resetSelectFu = useCallback(() => {
+    setFormData(I4baseFormData)
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [])
+
+  // 环节配置 打开 关闭
+  const [proId, setProId] = useState(0)
+  const titleRef = useRef('')
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: I4tableType) => {
+          return (
+            <>
+              <Button
+                size='small'
+                type='text'
+                onClick={() => {
+                  titleRef.current = item.name
+                  setProId(item.id)
+                }}
+              >
+                环节配置
+              </Button>
+              <Button size='small' type='text' onClick={() => setEditId(item.id)}>
+                编辑
+              </Button>
+            </>
+          )
+        }
+      }
+    ]
+  }, [])
+
+  // 点击编辑
+  const [editId, setEditId] = useState(0)
+
   return (
     <div className={styles.I4processSet}>
-      <div className='pageTitle'>流程设置</div>
+      <div className='pageTitle'>
+        流程设置{editId ? '-编辑' : ''}
+        {proId ? '-环节配置' : ''}
+      </div>
+      <div className='I4top'>
+        <div className='I4topll'>
+          流程名称:
+          <Input
+            placeholder='请输入流程名称'
+            style={{ width: 200 }}
+            maxLength={30}
+            value={formData.name}
+            onChange={e => txtChangeFu(e.target.value, 'name')}
+          />
+          &emsp;启用状态:
+          <Select
+            allowClear={true}
+            placeholder='全部'
+            style={{ width: 200 }}
+            value={formData.enabled}
+            onChange={e => setFormData({ ...formData, enabled: e })}
+            options={selectObj['启用状态']}
+          />
+        </div>
+        <div className='I4toprr'>
+          <Button type='primary' onClick={clickSearch}>
+            查询
+          </Button>
+          &emsp;<Button onClick={resetSelectFu}>重置</Button>
+        </div>
+      </div>
+
+      {/* 表格 */}
+      <div className='tableBox'>
+        <MyTable
+          yHeight={632}
+          list={tableList}
+          columnsTemp={I4tableC}
+          lastBtn={tableLastBtn}
+          pagingInfo={false}
+          widthSet={{ remark: 700 }}
+        />
+      </div>
+
+      {/* 编辑 */}
+      {editId ? <I4edit sId={editId} closeFu={() => setEditId(0)} succFu={getListFu} /> : null}
+
+      {/* 环节配置 */}
+      {proId ? (
+        <I4linkSet
+          title={titleRef.current}
+          sId={proId}
+          closeFu={() => setProId(0)}
+          userList={userList}
+        />
+      ) : null}
     </div>
   )
 }

+ 2 - 3
src/pages/Isystem/I6role/I6edit.tsx

@@ -363,12 +363,11 @@ function I6edit({ sId, closeFu, addTableFu, editTableFu }: Props) {
 
           {/* 确定和取消按钮 */}
           <br />
-          <Form.Item wrapperCol={{ offset: 9, span: 16 }} className='I6eBtn'>
+          <Form.Item className='I6eBtn'>
             <Button type='primary' htmlType='submit'>
               提交
             </Button>
-            <br />
-            <br />
+            &emsp;
             <MyPopconfirm txtK='取消' onConfirm={closeFu} />
           </Form.Item>
         </Form>

+ 7 - 6
src/pages/Isystem/I6role/index.module.scss

@@ -37,7 +37,7 @@
     }
 
     .I6eMain {
-      width: 900px;
+      width: calc(100% - 40px);
       position: relative;
       padding-top: 15px;
       .fromRow2 {
@@ -65,11 +65,12 @@
         }
       }
       .I6eBtn {
-        position: absolute;
-        top: 50%;
-        transform: translateY(-50%);
-        right: -95px;
-        margin: 0;
+        text-align: center;
+        // position: absolute;
+        // top: 50%;
+        // transform: translateY(-50%);
+        // right: -95px;
+        // margin: 0;
       }
       .I6Rtit {
         pointer-events: none;

+ 34 - 0
src/pages/Isystem/I7user/I7add/index.module.scss

@@ -0,0 +1,34 @@
+.I7add {
+  :global {
+    .ant-modal-close {
+      display: none;
+    }
+
+    .ant-modal {
+      width: 800px !important;
+    }
+
+    .I7addMain {
+      border-top: 1px solid #999999;
+      padding-top: 15px;
+      width: 100%;
+
+      .passTit {
+        color: #ff4d4f;
+        font-size: 14px;
+        padding-left: 98px;
+      }
+
+      .ant-form-item-label {
+        max-width: 98px;
+        min-width: 98px;
+      }
+      .Z6arow {
+        display: flex;
+        .ant-form-item {
+          margin-right: 40px;
+        }
+      }
+    }
+  }
+}

+ 221 - 0
src/pages/Isystem/I7user/I7add/index.tsx

@@ -0,0 +1,221 @@
+import { MessageFu } from '@/utils/message'
+import { Button, Cascader, Form, FormInstance, Input, Modal, Select } from 'antd'
+import React, { useCallback, useEffect, useRef } from 'react'
+import styles from './index.module.scss'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { useDispatch, useSelector } from 'react-redux'
+import { RootState } from '@/store'
+import { UserTableAPIType } from '../data'
+import { I6_APIgetList } from '@/store/action/Isystem/I6role'
+import { getUserInfoByIdAPI, userSaveAPI } from '@/store/action/Isystem/I7user'
+import { treeLastIdFindFatherFu } from '@/utils/dataChange'
+
+type Props = {
+  id: any
+  closePage: () => void
+  upTableList: (formOld: UserTableAPIType) => void
+  addTableList: () => void
+  formOld: UserTableAPIType
+}
+
+function I7add({ id, closePage, upTableList, addTableList, formOld }: Props) {
+  // 角色
+  const dispatch = useDispatch()
+  useEffect(() => {
+    dispatch(
+      I6_APIgetList({
+        pageNum: 1,
+        pageSize: 99999,
+        searchKey: ''
+      })
+    )
+  }, [dispatch])
+
+  const { list: roleList } = useSelector((state: RootState) => state.I6role.tableInfo)
+
+  // 所属部门
+  const { treeData } = useSelector((state: RootState) => state.I5organization)
+
+  // 设置表单初始数据(区分编辑和新增)
+  const FormBoxRef = useRef<FormInstance>(null)
+
+  const getInfoInAPIFu = useCallback(
+    async (id: number) => {
+      if (treeData && treeData.length) {
+        const res = await getUserInfoByIdAPI(id)
+
+        const data = res.data
+
+        const deptId = treeLastIdFindFatherFu(treeData, data.deptId + '', 'id')
+
+        FormBoxRef.current?.setFieldsValue({
+          ...data,
+          deptId
+        })
+      }
+
+      // console.log("是编辑,在这里发请求拿数据", res);
+    },
+    [treeData]
+  )
+
+  // 没有通过校验
+  const onFinishFailed = useCallback(() => {
+    // return MessageFu.warning("有表单不符号规则!");
+  }, [])
+
+  useEffect(() => {
+    if (id) getInfoInAPIFu(id)
+    else {
+      FormBoxRef.current?.setFieldsValue({})
+    }
+  }, [getInfoInAPIFu, id])
+
+  // 通过校验点击确定
+  const onFinish = useCallback(
+    async (values: any) => {
+      const obj = {
+        ...values,
+        id: id ? id : null
+      }
+
+      const deptIdRes = obj.deptId
+      if (deptIdRes) obj.deptId = Number(deptIdRes[deptIdRes.length - 1])
+
+      // obj.isLeader = obj.isLeader ? 1 : 0
+
+      // if (1 + 1 === 2) {
+      //   console.log(123, obj)
+
+      //   return
+      // }
+
+      const res: any = await userSaveAPI(obj)
+
+      if (res.code === 0) {
+        MessageFu.success(id ? '编辑成功!' : '新增成功!')
+        if (id) upTableList(formOld)
+        else addTableList()
+
+        closePage()
+      }
+      // console.log("通过校验,点击确定");
+    },
+    [addTableList, closePage, formOld, id, upTableList]
+  )
+
+  return (
+    <Modal
+      wrapClassName={styles.I7add}
+      destroyOnClose
+      open={true}
+      title={id ? '编辑用户' : '新增用户'}
+      footer={
+        [] // 设置footer为空,去掉 取消 确定默认按钮
+      }
+    >
+      <div className='I7addMain'>
+        <Form
+          scrollToFirstError={true}
+          ref={FormBoxRef}
+          name='basic'
+          labelCol={{ span: 5 }}
+          onFinish={onFinish}
+          onFinishFailed={onFinishFailed}
+          autoComplete='off'
+        >
+          <Form.Item
+            label='登录账号'
+            name='userName'
+            rules={[
+              { required: true, message: '请输入账号名!' },
+              { min: 6, message: '最少6个字!' }
+            ]}
+            getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+          >
+            <Input disabled={id} maxLength={15} showCount placeholder='请输入内容' />
+          </Form.Item>
+
+          <Form.Item
+            label='真实姓名'
+            name='realName'
+            rules={[{ required: true, message: '请输入真实姓名!' }]}
+            getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+          >
+            <Input maxLength={10} showCount placeholder='请输入内容' />
+          </Form.Item>
+          {/* 
+          <Form.Item
+            label='手机号'
+            name='phone'
+            rules={[
+              { required: true, message: '请输入手机号!' },
+              {
+                pattern: /^1[3-9][0-9]{9}$/,
+                message: '请输入正确格式的手机号!'
+              }
+            ]}
+            getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
+          >
+            <Input maxLength={11} showCount placeholder='请输入11位手机号' />
+          </Form.Item> */}
+
+          <div className='Z6arow'>
+            <Form.Item
+              label='所属部门'
+              name='deptId'
+              rules={[{ required: true, message: '请选择所属部门部门!' }]}
+            >
+              <Cascader
+                allowClear={false}
+                changeOnSelect
+                style={{ width: 240 }}
+                options={treeData}
+                fieldNames={{ label: 'name', value: 'id', children: 'children' }}
+                placeholder='请选择'
+              />
+            </Form.Item>
+
+            {/* <Form.Item
+              label=''
+              name='isLeader'
+              valuePropName='checked'
+              getValueFromEvent={e => (e.target.checked ? 1 : 0)}
+            >
+              <Checkbox>设为主管</Checkbox>
+            </Form.Item> */}
+          </div>
+
+          <Form.Item
+            label='角色'
+            name='roleId'
+            rules={[{ required: true, message: '请选择角色!' }]}
+          >
+            <Select
+              style={{ width: 240 }}
+              placeholder='请选择'
+              options={roleList.filter(v => v.id !== 1)}
+              fieldNames={{ value: 'id', label: 'roleName' }}
+            />
+          </Form.Item>
+
+          {id ? null : <div className='passTit'>* 默认密码 Aa147852</div>}
+
+          {/* 确定和取消按钮 */}
+          <br />
+          <Form.Item wrapperCol={{ offset: 9, span: 16 }}>
+            <Button type='primary' htmlType='submit'>
+              提交
+            </Button>
+            &emsp;
+            <MyPopconfirm txtK='取消' onConfirm={closePage} />
+          </Form.Item>
+        </Form>
+      </div>
+    </Modal>
+  )
+}
+
+const MemoI7add = React.memo(I7add)
+
+export default MemoI7add

+ 43 - 0
src/pages/Isystem/I7user/data.ts

@@ -0,0 +1,43 @@
+export type UserTableAPIType = {
+  pageNum: number
+  pageSize: number
+  searchKey: string
+  deptId: any
+}
+
+export type UserTableListType = {
+  createTime: string
+  creatorId: null
+  creatorName: string
+  id: number
+  isAdmin: number
+  isEnabled: number
+  nickName: string
+  phone: string
+  realName: string
+  roleId: null
+  roleName: string
+  sex: string
+  thumb: string
+  updateTime: string
+  userName: string
+  deptName: string
+  deptNameRes: string
+  deptId: number
+  source: string
+}
+
+export type SaveUserType = {
+  id: number | null
+  userName: string
+  nickName: string
+  roleId: number
+  realName: string
+}
+
+export const baseFormData: UserTableAPIType = {
+  pageNum: 1,
+  pageSize: 10,
+  searchKey: '',
+  deptId: undefined
+}

+ 19 - 0
src/pages/Isystem/I7user/index.module.scss

@@ -1,4 +1,23 @@
 .I7user {
   :global {
+    .selectBox {
+      border-radius: 10px;
+      padding: 15px 24px;
+      background-color: var(--boxBcaColor);
+      display: flex;
+      justify-content: space-between;
+      // 级联选择器的 placeholder
+      .ant-select-selection-placeholder {
+        color: black;
+      }
+    }
+
+    .tableBox {
+      border-radius: 10px;
+      overflow: hidden;
+      margin-top: 15px;
+      height: calc(100% - 77px);
+      background-color: var(--boxBcaColor);
+    }
   }
 }

+ 227 - 2
src/pages/Isystem/I7user/index.tsx

@@ -1,9 +1,234 @@
-import React from 'react'
+import { RootState } from '@/store'
+import { MessageFu } from '@/utils/message'
+import { Input, Button, Cascader } from 'antd'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
+import { useDispatch, useSelector } from 'react-redux'
 import styles from './index.module.scss'
+import MyTable from '@/components/MyTable'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { I5_APIgetTree } from '@/store/action/Isystem/I5organization'
+import { baseFormData, UserTableAPIType, UserTableListType } from './data'
+import { getUserListAPI, userPassResetAPI, userRemoveAPI } from '@/store/action/Isystem/I7user'
+import { I7tableC } from '@/utils/tableData'
+import { buMenRes } from '@/utils/dataChange'
+import I7add from './I7add'
+
 function I7user() {
+  const dispatch = useDispatch()
+
+  // 获取组织管理列表
+  useEffect(() => {
+    dispatch(I5_APIgetTree())
+  }, [dispatch])
+
+  const { treeData } = useSelector((state: RootState) => state.I5organization)
+
+  // 顶部筛选
+  const [formData, setFormData] = useState(baseFormData)
+  const formDataRef = useRef(baseFormData)
+  const formDataOldRef = useRef(baseFormData)
+
+  useEffect(() => {
+    formDataRef.current = formData
+  }, [formData])
+
+  // 点击搜索的 时间戳
+  const [timeKey, setTimeKey] = useState(0)
+
+  // 点击搜索
+  const clickSearch = useCallback(() => {
+    setFormData({ ...formData, pageNum: 1 })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [formData])
+
+  // 封装发送请求的函数
+  const getListFu = useCallback(
+    (formOld?: UserTableAPIType) => {
+      if (formOld) setFormData({ ...formOld })
+
+      const obj = formOld
+        ? { ...formOld }
+        : {
+            ...formDataRef.current
+          }
+
+      formDataOldRef.current = { ...formDataRef.current }
+
+      let deptIdRes = obj.deptId
+
+      if (deptIdRes) obj.deptId = Number(deptIdRes[deptIdRes.length - 1])
+
+      dispatch(getUserListAPI(obj))
+    },
+    [dispatch]
+  )
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu, timeKey])
+
+  // 输入框的改变
+  const txtChangeFu = useCallback(
+    (txt: string, key: 'searchKey') => {
+      setFormData({
+        ...formData,
+        [key]: txt
+      })
+    },
+    [formData]
+  )
+
+  // 点击重置
+  const resetSelectFu = useCallback(() => {
+    // 把2个输入框和时间选择器清空
+    setFormData(baseFormData)
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [])
+
+  // 从仓库中获取表格数据
+  const tableInfo = useSelector((state: RootState) => state.I7user.tableInfo)
+
+  // 页码变化
+  const paginationChange = useCallback(
+    (pageNum: number, pageSize: number) => {
+      setFormData({ ...formData, pageNum, pageSize })
+      setTimeout(() => {
+        setTimeKey(Date.now())
+      }, 50)
+    },
+    [formData]
+  )
+
+  // 点击删除
+  const delTableFu = useCallback(
+    async (id: number) => {
+      const res: any = await userRemoveAPI(id)
+      if (res.code === 0) {
+        MessageFu.success('删除成功!')
+        getListFu()
+      }
+    },
+    [getListFu]
+  )
+
+  // 点击重置密码
+  const resetPassFu = useCallback(async (id: number) => {
+    const res: any = await userPassResetAPI(id)
+    if (res.code === 0) MessageFu.success('重置成功!')
+  }, [])
+
+  // 0------------点击新增或者编辑出来的页面
+  const [editPageShow, setEditPageShow] = useState(false)
+  const editId = useRef(0)
+
+  const openEditPageFu = useCallback((id: number) => {
+    editId.current = id
+    setEditPageShow(true)
+  }, [])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: UserTableListType) => {
+          return item.isAdmin === 1 ? (
+            '-'
+          ) : (
+            <>
+              <MyPopconfirm
+                txtK='重置密码'
+                onConfirm={() => resetPassFu(item.id)}
+                Dom={
+                  <Button size='small' type='text'>
+                    重置密码
+                  </Button>
+                }
+              />
+              <Button size='small' type='text' onClick={() => openEditPageFu(item.id)}>
+                编辑
+              </Button>
+              <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item.id)} />
+            </>
+          )
+        }
+      }
+    ]
+  }, [delTableFu, openEditPageFu, resetPassFu])
+
   return (
     <div className={styles.I7user}>
-      <div className='pageTitle'>流程设置</div>
+      <div className='pageTitle'>用户管理</div>
+      <div className='userTop'>
+        <div className='selectBox'>
+          <div className='selectBoxRow'>
+            <span>搜索项:</span>
+            <Input
+              maxLength={15}
+              showCount
+              style={{ width: 300 }}
+              placeholder='请输入用户名或真实姓名'
+              value={formData.searchKey}
+              onChange={e => txtChangeFu(e.target.value, 'searchKey')}
+            />
+            &emsp;&emsp;
+            <span>选择部门:</span>
+            <Cascader
+              // allowClear={false}
+              changeOnSelect
+              style={{ width: 240 }}
+              options={treeData}
+              value={formData.deptId as string[]}
+              fieldNames={{ label: 'name', value: 'id', children: 'children' }}
+              placeholder='全部'
+              onChange={e =>
+                setFormData({
+                  ...formData,
+                  deptId: e as string[]
+                })
+              }
+            />
+          </div>
+
+          <div className='selectBoxRow'>
+            <Button type='primary' onClick={() => openEditPageFu(0)}>
+              新增
+            </Button>
+            &emsp;
+            <Button type='primary' onClick={clickSearch}>
+              查询
+            </Button>
+            &emsp;<Button onClick={resetSelectFu}>重置</Button>
+          </div>
+        </div>
+      </div>
+      {/* 表格主体 */}
+      <div className='tableBox'>
+        <MyTable
+          yHeight={585}
+          list={buMenRes(tableInfo.list)}
+          columnsTemp={I7tableC}
+          lastBtn={tableLastBtn}
+          pageNum={formData.pageNum}
+          pageSize={formData.pageSize}
+          total={tableInfo.total}
+          onChange={(pageNum, pageSize) => paginationChange(pageNum, pageSize)}
+        />
+      </div>
+
+      {/* 点击新增或者编辑 */}
+      {editPageShow ? (
+        <I7add
+          id={editId.current}
+          closePage={() => setEditPageShow(false)}
+          upTableList={formOld => getListFu(formOld)}
+          addTableList={resetSelectFu}
+          formOld={formDataOldRef.current}
+        />
+      ) : null}
     </div>
   )
 }

+ 11 - 0
src/pages/Isystem/I8log/data.ts

@@ -0,0 +1,11 @@
+export type LogTableType = {
+  createTime: string
+  creatorId: null
+  creatorName: string
+  description: string
+  id: number
+  ip: string
+  type: string
+  updateTime: null
+  userName: string
+}

+ 1 - 1
src/pages/Z2log/index.module.scss

@@ -1,4 +1,4 @@
-.Z2log {
+.I8log {
   :global {
     .logTop {
       border-radius: 10px;

+ 8 - 8
src/pages/Z2log/index.tsx

@@ -1,15 +1,15 @@
 import { RootState } from '@/store'
-import { getLogListAPI } from '@/store/action/Z2log'
+import { getLogListAPI } from '@/store/action/Isystem/I8log'
 import { Input, DatePicker } from 'antd'
 import React, { useCallback, useEffect, useRef, useState } from 'react'
 import { useDispatch, useSelector } from 'react-redux'
 import styles from './index.module.scss'
 import MyTable from '@/components/MyTable'
-import { Z2tableC } from '@/utils/tableData'
+import { I8tableC } from '@/utils/tableData'
 
 const { RangePicker } = DatePicker
 
-function Z2log() {
+function I8log() {
   const dispatch = useDispatch()
 
   // 筛选和分页
@@ -51,10 +51,10 @@ function Z2log() {
   }, [dispatch, fromData])
 
   // ---------关于表格
-  const tableInfo = useSelector((state: RootState) => state.Z2log.tableInfo)
+  const tableInfo = useSelector((state: RootState) => state.I8log.tableInfo)
 
   return (
-    <div className={styles.Z2log}>
+    <div className={styles.I8log}>
       <div className='pageTitle'>系统日志</div>
       <div className='logTop'>
         <div className='tableSelectBox'>
@@ -81,7 +81,7 @@ function Z2log() {
         <MyTable
           yHeight={585}
           list={tableInfo.list}
-          columnsTemp={Z2tableC}
+          columnsTemp={I8tableC}
           pageNum={fromData.pageNum}
           pageSize={fromData.pageSize}
           total={tableInfo.total}
@@ -92,6 +92,6 @@ function Z2log() {
   )
 }
 
-const MemoZ2log = React.memo(Z2log)
+const MemoI8log = React.memo(I8log)
 
-export default MemoZ2log
+export default MemoI8log

+ 32 - 3
src/pages/Layout/data.ts

@@ -1,6 +1,35 @@
-import { RouterType, RouterTypeRow } from '@/types'
 import React from 'react'
 
+export type LookDomType = {
+  src: string
+  type: 'video' | 'audio' | 'model' | ''
+  flag?: boolean
+}
+
+export type RouterTypeRow = {
+  id: number
+  name: string
+  path: string
+  pathLast?: string
+  Com: React.LazyExoticComponent<React.MemoExoticComponent<() => JSX.Element>>
+  pageType?: string
+  authority?: boolean
+}
+
+export type RouterType = {
+  id: number
+  name: string
+  show: boolean
+  son: RouterTypeRow[]
+}[]
+
+export type FileImgListType = {
+  id: number
+  fileName: string
+  filePath: string
+  type: 'img' | 'video' | 'doc'
+}
+
 const tabLeftArr: RouterType = [
   {
     id: 1,
@@ -269,14 +298,14 @@ const tabLeftArr: RouterType = [
         id: 760,
         name: '用户管理',
         path: '/user',
-        Com: React.lazy(() => import('../Z1user'))
+        Com: React.lazy(() => import('../Isystem/I7user'))
       },
 
       {
         id: 770,
         name: '系统日志',
         path: '/log',
-        Com: React.lazy(() => import('../Z2log'))
+        Com: React.lazy(() => import('../Isystem/I8log'))
       }
       // 不需要 高亮的 详情页
       // {

+ 1 - 2
src/pages/Layout/index.tsx

@@ -12,8 +12,7 @@ import { changSetFu, getTokenInfo, removeTokenInfo } from '@/utils/storage'
 import { MessageFu } from '@/utils/message'
 import NotFound from '@/components/NotFound'
 import classNames from 'classnames'
-import { RouterType, RouterTypeRow } from '@/types'
-import tabLeftArr, { routerSon } from './data'
+import tabLeftArr, { routerSon, RouterType, RouterTypeRow } from './data'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import store from '@/store'
 import SpinLodingSon from '@/components/SpinLodingSon'

+ 0 - 19
src/pages/Z1user/UserAdd/index.module.scss

@@ -1,19 +0,0 @@
-.userAdd {
-  :global {
-    .ant-modal-close {
-      display: none;
-    }
-
-    .userAddMain {
-      border-top: 1px solid #999999;
-      padding-top: 15px;
-      width: 100%;
-
-      .passTit {
-        color: #ff4d4f;
-        font-size: 14px;
-        padding-left: 98px;
-      }
-    }
-  }
-}

+ 0 - 134
src/pages/Z1user/UserAdd/index.tsx

@@ -1,134 +0,0 @@
-import { getUserInfoByIdAPI, userSaveAPI } from '@/store/action/Z1user'
-import { SaveUserType } from '@/types'
-import { MessageFu } from '@/utils/message'
-import { Button, Form, FormInstance, Input, Modal, Select } from 'antd'
-import React, { useCallback, useEffect, useRef } from 'react'
-import styles from './index.module.scss'
-import MyPopconfirm from '@/components/MyPopconfirm'
-
-type Props = {
-  id: any
-  closePage: () => void
-  upTableList: () => void
-  addTableList: () => void
-}
-
-function UserAdd({ id, closePage, upTableList, addTableList }: Props) {
-  // 设置表单初始数据(区分编辑和新增)
-  const FormBoxRef = useRef<FormInstance>(null)
-
-  const getInfoInAPIFu = useCallback(async (id: number) => {
-    const res = await getUserInfoByIdAPI(id)
-    FormBoxRef.current?.setFieldsValue(res.data)
-    // console.log("是编辑,在这里发请求拿数据", res);
-  }, [])
-
-  // 没有通过校验
-  const onFinishFailed = useCallback(() => {
-    // return MessageFu.warning("有表单不符号规则!");
-  }, [])
-
-  useEffect(() => {
-    if (id) getInfoInAPIFu(id)
-    else {
-      FormBoxRef.current?.setFieldsValue({})
-    }
-  }, [getInfoInAPIFu, id])
-
-  // 通过校验点击确定
-  const onFinish = useCallback(
-    async (values: any) => {
-      const obj: SaveUserType = {
-        ...values,
-        id: id ? id : null
-      }
-
-      const res: any = await userSaveAPI(obj)
-
-      if (res.code === 0) {
-        MessageFu.success(id ? '编辑成功!' : '新增成功!')
-        if (id) upTableList()
-        else addTableList()
-
-        closePage()
-      }
-      // console.log("通过校验,点击确定");
-    },
-    [addTableList, closePage, id, upTableList]
-  )
-
-  return (
-    <Modal
-      wrapClassName={styles.userAdd}
-      destroyOnClose
-      open={true}
-      title={id ? '编辑用户' : '新增用户'}
-      footer={
-        [] // 设置footer为空,去掉 取消 确定默认按钮
-      }
-    >
-      <div className='userAddMain'>
-        <Form
-          scrollToFirstError={true}
-          ref={FormBoxRef}
-          name='basic'
-          labelCol={{ span: 5 }}
-          onFinish={onFinish}
-          onFinishFailed={onFinishFailed}
-          autoComplete='off'
-        >
-          <Form.Item
-            label='账号名'
-            name='userName'
-            rules={[
-              { required: true, message: '请输入账号名!' },
-              { min: 6, message: '最少6个字!' }
-            ]}
-            getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
-          >
-            <Input disabled={id} maxLength={15} showCount placeholder='请输入内容' />
-          </Form.Item>
-
-          <Form.Item
-            label='真实姓名'
-            name='realName'
-            // rules={[{ required: true, message: "请输入真实姓名!" }]}
-            getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
-          >
-            <Input maxLength={8} showCount placeholder='请输入内容' />
-          </Form.Item>
-
-          <Form.Item
-            label='角色'
-            name='roleId'
-            rules={[{ required: true, message: '请选择角色!' }]}
-          >
-            <Select
-              style={{ width: 240 }}
-              placeholder='请选择'
-              // 待完善sg -角色
-              options={[]}
-              fieldNames={{ value: 'id', label: 'roleName' }}
-            />
-          </Form.Item>
-
-          {id ? null : <div className='passTit'>* 默认密码 Aa147852</div>}
-
-          {/* 确定和取消按钮 */}
-          <br />
-          <Form.Item wrapperCol={{ offset: 9, span: 16 }}>
-            <Button type='primary' htmlType='submit'>
-              提交
-            </Button>
-            &emsp;
-            <MyPopconfirm txtK='取消' onConfirm={closePage} />
-          </Form.Item>
-        </Form>
-      </div>
-    </Modal>
-  )
-}
-
-const MemoUserAdd = React.memo(UserAdd)
-
-export default MemoUserAdd

+ 0 - 87
src/pages/Z1user/index.module.scss

@@ -1,87 +0,0 @@
-.Z1user {
-  :global {
-    .selectBox {
-      border-radius: 10px;
-      padding: 15px 24px;
-      background-color: var(--boxBcaColor);
-      display: flex;
-      justify-content: space-between;
-    }
-
-    .tableBox {
-      border-radius: 10px;
-      overflow: hidden;
-      margin-top: 15px;
-      height: calc(100% - 77px);
-      background-color: var(--boxBcaColor);
-    }
-  }
-}
-
-// 授权
-.Z1auth {
-  :global {
-    .ant-modal-close {
-      display: none;
-    }
-
-    .ant-modal {
-      width: 800px !important;
-    }
-
-    .ant-modal-body {
-      border-top: 1px solid #ccc;
-    }
-
-    .Z1aEmain {
-      max-height: 500px;
-      overflow-y: auto;
-      padding-top: 15px;
-
-      .Z1aRow {
-        margin-bottom: 10px;
-        display: flex;
-        .Z1aRowll {
-          font-weight: 700;
-          text-align: right;
-          width: 100px;
-        }
-        .Z1aRowrr {
-          width: calc(100% - 100px);
-        }
-        .Z1aRowrr2 {
-          .ant-checkbox-wrapper {
-            width: 200px;
-            & > span {
-              &:nth-of-type(2) {
-                width: calc(100% - 20px);
-                overflow: hidden;
-                text-overflow: ellipsis;
-                white-space: nowrap;
-              }
-            }
-          }
-        }
-      }
-
-      .Z1aErr {
-        margin-bottom: 20px;
-        text-align: center;
-        color: #ff4d4f;
-        opacity: 0;
-        pointer-events: none;
-        transition: all 0.3s;
-        position: relative;
-        top: -10px;
-      }
-
-      .Z1aErrAc {
-        opacity: 1;
-        top: 0;
-      }
-    }
-    .Z1aEbtn {
-      text-align: center;
-    }
-  }
-}

+ 0 - 189
src/pages/Z1user/index.tsx

@@ -1,189 +0,0 @@
-import { RootState } from '@/store'
-import { getUserListAPI, userPassResetAPI, userRemoveAPI } from '@/store/action/Z1user'
-import { UserTableAPIType, UserTableListType } from '@/types'
-import { MessageFu } from '@/utils/message'
-import { Input, Button } from 'antd'
-import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import { useDispatch, useSelector } from 'react-redux'
-import styles from './index.module.scss'
-import UserAdd from './UserAdd'
-import MyTable from '@/components/MyTable'
-import { Z1tableC } from '@/utils/tableData'
-import MyPopconfirm from '@/components/MyPopconfirm'
-
-function Z1user() {
-  const dispatch = useDispatch()
-
-  // 顶部筛选
-  const [fromData, setFromData] = useState<UserTableAPIType>({
-    pageNum: 1,
-    pageSize: 10,
-    searchKey: ''
-  })
-
-  // 封装发送请求的函数
-
-  const getList = useCallback(async () => {
-    dispatch(getUserListAPI(fromData))
-  }, [dispatch, fromData])
-
-  useEffect(() => {
-    getList()
-  }, [getList])
-
-  const timeRef = useRef(-1)
-  // 用户名
-  const txtChangeFu = useCallback(
-    (e: React.ChangeEvent<HTMLInputElement>, key: 'searchKey') => {
-      clearTimeout(timeRef.current)
-      timeRef.current = window.setTimeout(() => {
-        setFromData({
-          ...fromData,
-          [key]: e.target.value,
-          pageNum: 1
-        })
-      }, 500)
-    },
-    [fromData]
-  )
-
-  // 点击重置
-  const [inputKey, setInputKey] = useState(1)
-  const resetSelectFu = useCallback(() => {
-    // 把2个输入框和时间选择器清空
-    setInputKey(Date.now())
-    setFromData({
-      pageNum: 1,
-      pageSize: 10,
-      searchKey: ''
-    })
-  }, [])
-
-  // 从仓库中获取表格数据
-  const tableInfo = useSelector((state: RootState) => state.Z1user.tableInfo)
-
-  // 点击删除
-  const delTableFu = useCallback(
-    async (id: number) => {
-      const res: any = await userRemoveAPI(id)
-      if (res.code === 0) {
-        MessageFu.success('删除成功!')
-        getList()
-      }
-    },
-    [getList]
-  )
-
-  // 点击重置密码
-  const resetPassFu = useCallback(async (id: number) => {
-    const res: any = await userPassResetAPI(id)
-    if (res.code === 0) MessageFu.success('重置成功!')
-  }, [])
-
-  // 0------------点击新增或者编辑出来的页面
-  const [editPageShow, setEditPageShow] = useState(false)
-  const editId = useRef(0)
-
-  const openEditPageFu = useCallback(
-    (id: number) => {
-      if (id === 0 && tableInfo.list.length >= 20) return MessageFu.warning('最多支持20个用户!')
-
-      editId.current = id
-      setEditPageShow(true)
-    },
-    [tableInfo.list.length]
-  )
-
-  const tableLastBtn = useMemo(() => {
-    return [
-      {
-        title: '操作',
-        render: (item: UserTableListType) => {
-          return item.isAdmin === 1 ? (
-            '-'
-          ) : (
-            <>
-              <MyPopconfirm
-                txtK='重置密码'
-                onConfirm={() => resetPassFu(item.id)}
-                Dom={
-                  <Button size='small' type='text'>
-                    重置密码
-                  </Button>
-                }
-              />
-
-              <Button size='small' type='text' onClick={() => openEditPageFu(item.id)}>
-                编辑
-              </Button>
-              <MyPopconfirm txtK='删除' onConfirm={() => delTableFu(item.id)} />
-            </>
-          )
-        }
-      }
-    ]
-  }, [delTableFu, openEditPageFu, resetPassFu])
-
-  return (
-    <div className={styles.Z1user}>
-      <div className='pageTitle'>用户管理</div>
-      <div className='userTop'>
-        <div className='selectBox'>
-          <div className='selectBoxRow'>
-            <span>搜索项:</span>
-            <Input
-              key={inputKey}
-              maxLength={10}
-              showCount
-              style={{ width: 300 }}
-              placeholder='请输入用户名'
-              allowClear
-              onChange={e => txtChangeFu(e, 'searchKey')}
-            />
-          </div>
-
-          <div className='selectBoxRow'>
-            &emsp;&emsp;<Button onClick={resetSelectFu}>重置</Button>
-            &emsp;&emsp;
-            <Button
-              type='primary'
-              onClick={() => {
-                if (tableInfo.total >= 30) return MessageFu.warning('最多30个账号!')
-                openEditPageFu(0)
-              }}
-            >
-              新增
-            </Button>
-          </div>
-        </div>
-      </div>
-      {/* 表格主体 */}
-      <div className='tableBox'>
-        <MyTable
-          yHeight={585}
-          list={tableInfo.list}
-          columnsTemp={Z1tableC}
-          lastBtn={tableLastBtn}
-          pageNum={fromData.pageNum}
-          pageSize={fromData.pageSize}
-          total={tableInfo.total}
-          onChange={(pageNum, pageSize) => setFromData({ ...fromData, pageNum, pageSize })}
-        />
-      </div>
-
-      {/* 点击新增或者编辑 */}
-      {editPageShow ? (
-        <UserAdd
-          id={editId.current}
-          closePage={() => setEditPageShow(false)}
-          upTableList={getList}
-          addTableList={resetSelectFu}
-        />
-      ) : null}
-    </div>
-  )
-}
-
-const MemoZ1user = React.memo(Z1user)
-
-export default MemoZ1user

+ 62 - 0
src/store/action/Isystem/I4processSet.ts

@@ -0,0 +1,62 @@
+import { AppDispatch } from '@/store'
+import http from '@/utils/http'
+/**
+ * 流程设置 - 获取分页列表
+ */
+export const I4_APIgetList = (data: any): any => {
+  return async (dispatch: AppDispatch) => {
+    const res = await http.post('cms/flow/pageList', data)
+    if (res.code === 0) {
+      dispatch({ type: 'I4/getList', payload: res.data.records })
+    }
+  }
+}
+
+/**
+ * 流程设置-编辑
+ */
+export const I4_APIsave = (data: any) => {
+  return http.post('cms/flow/edit', data)
+}
+
+/**
+ * 流程设置-获取详情
+ */
+export const I4_APIgetInfo = (id: number) => {
+  return http.get(`cms/flow/detail/${id}`)
+}
+
+/**
+ * 流程设置- 环节 - 列表
+ */
+export const I4_APIgetProList = (id: number) => {
+  return http.get(`cms/flow/process/getList/${id}`)
+}
+
+/**
+ * 流程设置- 环节-获取详情
+ */
+export const I4_APIgetProInfo = (id: number) => {
+  return http.get(`cms/flow/process/${id}`)
+}
+
+/**
+ * 流程设置- 环节-删除
+ */
+export const I4_APIgetProDel = (id: number) => {
+  return http.get(`cms/flow/process/remove/${id}`)
+}
+
+/**
+ * 流程设置- 环节-新增/编辑
+ */
+export const I4_APIgetProSave = (data: any) => {
+  return http.post('cms/flow/process/save', data)
+}
+
+/**
+ * 流程设置- 环节 - 列表
+ */
+export const I4_APIgetProGetUser = (id: number) => {
+  return http.get(`cms/flow/process/getUser/${id}`)
+}

+ 7 - 20
src/store/action/Z1user.ts

@@ -1,10 +1,10 @@
-import { SaveUserType, UserTableAPIType } from '@/types'
 import http from '@/utils/http'
-import { AppDispatch } from '..'
+import { AppDispatch } from '@/store'
+import { SaveUserType } from '@/pages/Isystem/I7user/data'
 /**
  * 获取用户管理表格列表
  */
-export const getUserListAPI = (data: UserTableAPIType): any => {
+export const getUserListAPI = (data: any, back?: () => void): any => {
   return async (dispatch: AppDispatch) => {
     const res = await http.post('sys/user/list', data)
     if (res.code === 0) {
@@ -13,7 +13,8 @@ export const getUserListAPI = (data: UserTableAPIType): any => {
         total: res.data.total
       }
 
-      dispatch({ type: 'Z1/getList', payload: obj })
+      dispatch({ type: 'I7user/getList', payload: obj })
+      back && back()
     }
   }
 }
@@ -22,7 +23,7 @@ export const getUserListAPI = (data: UserTableAPIType): any => {
  * 删除用户
  */
 export const userRemoveAPI = (id: number) => {
-  return http.get(`sys/user/removes/${id}`)
+  return http.get(`cms/flow/remove/${id}`)
 }
 
 /**
@@ -47,22 +48,8 @@ export const getUserInfoByIdAPI = (id: number) => {
 }
 
 /**
- * 角色授权-获取
- */
-export const Z1_APIgetAuthByUserId = (userId: number) => {
-  return http.get(`sys/user/perm/detail/${userId}`)
-}
-
-/**
- * 角色授权-设置
- */
-export const Z1_APIsetAuth = (data: any) => {
-  return http.post('sys/user/perm/auth', data)
-}
-
-/**
  * 角色授权-获取 初始页面获取
  */
-export const Z1_APIgetAuthBase = () => {
+export const I7_APIgetAuthBase = () => {
   return http.get('sys/user/perm/getTree')
 }

+ 17 - 0
src/store/action/Isystem/I8log.ts

@@ -0,0 +1,17 @@
+import http from '@/utils/http'
+import { AppDispatch } from '../..'
+/**
+ * 获取日志表格列表
+ */
+export const getLogListAPI = (data: any): any => {
+  return async (dispatch: AppDispatch) => {
+    const res = await http.post('sys/log/list', data)
+    if (res.code === 0) {
+      const obj = {
+        list: res.data.records,
+        total: res.data.total
+      }
+      dispatch({ type: 'I8log/getList', payload: obj })
+    }
+  }
+}

+ 0 - 17
src/store/action/Z2log.ts

@@ -1,17 +0,0 @@
-import http from "@/utils/http";
-import { AppDispatch } from "..";
-/**
- * 获取日志表格列表
- */
-export const getLogListAPI = (data: any):any => {
-  return async (dispatch: AppDispatch) => {
-    const res = await http.post("sys/log/list", data);
-    if (res.code === 0) {
-      const obj = {
-        list: res.data.records,
-        total: res.data.total,
-      };
-      dispatch({ type: "Z2/getList", payload: obj });
-    }
-  };
-};

+ 25 - 0
src/store/reducer/Isystem/I4processSet.ts

@@ -0,0 +1,25 @@
+import { I4tableType } from '@/pages/Isystem/I4processSet/data'
+
+// 初始化状态
+const initState = {
+  // 列表数据
+  tableList: [] as I4tableType[]
+}
+
+// 定义 action 类型
+type Props = {
+  type: 'I4/getList'
+  payload: I4tableType[]
+}
+
+// reducer
+export default function Reducer(state = initState, action: Props) {
+  switch (action.type) {
+    // 获取列表数据
+    case 'I4/getList':
+      return { ...state, tableList: action.payload }
+
+    default:
+      return state
+  }
+}

+ 28 - 0
src/store/reducer/Isystem/I7user.ts

@@ -0,0 +1,28 @@
+import { UserTableListType } from '@/pages/Isystem/I7user/data'
+
+// 初始化状态
+const initState = {
+  // 列表数据
+  tableInfo: {
+    list: [] as UserTableListType[],
+    total: 0
+  }
+}
+
+// 定义 action 类型
+type Props = {
+  type: 'I7user/getList'
+  payload: { list: UserTableListType[]; total: number }
+}
+
+// reducer
+export default function Reducer(state = initState, action: Props) {
+  switch (action.type) {
+    // 获取列表数据
+    case 'I7user/getList':
+      return { ...state, tableInfo: action.payload }
+
+    default:
+      return state
+  }
+}

+ 10 - 10
src/store/reducer/Z2log.ts

@@ -1,27 +1,27 @@
-import { LogTableType } from "@/types";
+import { LogTableType } from '@/pages/Isystem/I8log/data'
 
 // 初始化状态
 const initState = {
   // 列表数据
   tableInfo: {
     list: [] as LogTableType[],
-    total: 0,
-  },
-};
+    total: 0
+  }
+}
 
 // 定义 action 类型
 type Props = {
-  type: "Z2/getList";
-  payload: { list: LogTableType[]; total: number };
-};
+  type: 'I8log/getList'
+  payload: { list: LogTableType[]; total: number }
+}
 
 // reducer
 export default function logReducer(state = initState, action: Props) {
   switch (action.type) {
     // 获取列表数据
-    case "Z2/getList":
-      return { ...state, tableInfo: action.payload };
+    case 'I8log/getList':
+      return { ...state, tableInfo: action.payload }
     default:
-      return state;
+      return state
   }
 }

+ 0 - 28
src/store/reducer/Z1user.ts

@@ -1,28 +0,0 @@
-import { UserTableListType } from "@/types";
-
-// 初始化状态
-const initState = {
-  // 列表数据
-  tableInfo: {
-    list: [] as UserTableListType[],
-    total: 0,
-  },
-};
-
-// 定义 action 类型
-type Props = {
-  type: "Z1/getList";
-  payload: { list: UserTableListType[]; total: number };
-};
-
-// reducer
-export default function userReducer(state = initState, action: Props) {
-  switch (action.type) {
-    // 获取列表数据
-    case "Z1/getList":
-      return { ...state, tableInfo: action.payload };
-
-    default:
-      return state;
-  }
-}

+ 6 - 4
src/store/reducer/index.ts

@@ -6,20 +6,22 @@ import A0Layout from './layout'
 
 import I2dict from './Isystem/I2dict'
 import I3numSet from './Isystem/I3numSet'
+import I4processSet from './Isystem/I4processSet'
 import I5organization from './Isystem/I5organization'
 import I6role from './Isystem/I6role'
-import Z1user from './Z1user'
-import Z2log from './Z2log'
+import I7user from './Isystem/I7user'
+import I8log from './Isystem/I8log'
 
 // 合并 reducer
 const rootReducer = combineReducers({
   A0Layout,
   I2dict,
   I3numSet,
+  I4processSet,
   I5organization,
   I6role,
-  Z1user,
-  Z2log
+  I7user,
+  I8log
 })
 
 // 默认导出

+ 1 - 1
src/store/reducer/layout.ts

@@ -1,4 +1,4 @@
-import { LookDomType, RouterTypeRow } from '@/types'
+import { LookDomType, RouterTypeRow } from '@/pages/Layout/data'
 import { MessageType } from '@/utils/message'
 
 // 初始化状态

+ 0 - 31
src/types/api/Z1user.d.ts

@@ -1,31 +0,0 @@
-export type UserTableAPIType={
-  pageNum:number
-  pageSize:number
-  searchKey:string
-}
-
-export type UserTableListType={
-  createTime: string;
-  creatorId: null;
-  creatorName: string;
-  id: number;
-  isAdmin: number;
-  isEnabled: number;
-  nickName: string;
-  phone: string;
-  realName: string;
-  roleId: null;
-  roleName: string;
-  sex: string;
-  thumb: string;
-  updateTime: string;
-  userName: string;
-}
-
-export type SaveUserType ={
-  id:number|null
-  userName:string
-  nickName:string
-  roleId:number
-  realName:string
-}

+ 0 - 11
src/types/api/Z2log.d.ts

@@ -1,11 +0,0 @@
-export type LogTableType = {
-  createTime: string;
-  creatorId: null;
-  creatorName: string;
-  description: string;
-  id: number;
-  ip: string;
-  type: string;
-  updateTime: null;
-  userName: string;
-}

+ 0 - 29
src/types/api/layot.d.ts

@@ -1,29 +0,0 @@
-export type LookDomType = {
-  src: string
-  type: 'video' | 'audio' | 'model' | ''
-  flag?: boolean
-}
-
-export type RouterTypeRow = {
-  id: number
-  name: string
-  path: string
-  pathLast?: string
-  Com: React.LazyExoticComponent<React.MemoExoticComponent<() => JSX.Element>>
-  pageType?: string
-  authority?: boolean
-}
-
-export type RouterType = {
-  id: number
-  name: string
-  show: boolean
-  son: RouterTypeRow[]
-}[]
-
-export type FileImgListType = {
-  id: number
-  fileName: string
-  filePath: string
-  type: 'img' | 'video' | 'doc'
-}

+ 0 - 3
src/types/index.d.ts

@@ -1,3 +0,0 @@
-export * from './api/layot'
-export * from './api/Z1user'
-export * from './api/Z2log'

+ 56 - 0
src/utils/dataChange.ts

@@ -0,0 +1,56 @@
+import { TypeI5Tree } from '@/pages/Isystem/I5organization/data'
+import store from '@/store'
+
+// 树结构 通过最后一级id得到前面的id或者名称
+
+export function treeLastIdFindFatherFu(
+  tree: TypeI5Tree[],
+  targetId: string,
+  returnType: 'id' | 'name'
+): string[] {
+  let pathNodes: TypeI5Tree[] = []
+
+  // 递归遍历函数
+  const traverse = (nodes: TypeI5Tree[], currentPath: TypeI5Tree[]): boolean => {
+    for (const node of nodes) {
+      const newPath = [...currentPath, node]
+
+      if (node.id === targetId) {
+        pathNodes = newPath
+        return true
+      }
+
+      if (node.children?.length) {
+        const found = traverse(node.children, newPath)
+        if (found) return true
+      }
+    }
+    return false
+  }
+
+  traverse(tree, [])
+
+  // 根据返回类型转换结果
+  return returnType === 'id' ? pathNodes.map(n => n.id) : pathNodes.map(n => n.name)
+}
+
+// -------------------处理所属部门数据-------------------
+let buMenTree: TypeI5Tree[] = []
+export const buMenRes = (list: any[]) => {
+  buMenTree = store.getState().I5organization.treeData
+  let arr = list.map((v: any) => ({
+    ...v,
+    deptNameRes: v.deptId
+      ? treeLastIdFindFatherFu(buMenTree, v.deptId + '', 'name').join(' / ')
+      : '-'
+  }))
+  return arr
+}
+
+// 筛选下拉框数据
+export const selectObj = {
+  启用状态: [
+    { value: 1, label: '启用' },
+    { value: 0, label: '禁用' }
+  ]
+}

+ 2 - 2
src/utils/storage.ts

@@ -1,6 +1,6 @@
 // ------------------------------------token的本地存储------------------------------------
 
-import { RouterTypeRow } from '@/types'
+import { RouterTypeRow } from '@/pages/Layout/data'
 
 // 用户 Token 的本地缓存键名,自己定义
 const TOKEN_KEY = 'QING_DAO_PI_JIU_GOODS_HOUTAI_USETINFO'
@@ -42,7 +42,7 @@ export const getTokenFu = (): string => {
 }
 
 // --------------------业务中心-常用功能存储
-const CHANG_KEY = 'JILINGGOODS_HT_CHANG_ARR'
+const CHANG_KEY = 'QING_DAO_PI_JIU_GOODS_HT_CHANG_ARR'
 
 // 存
 export const changSetFu = (info: RouterTypeRow): void => {

+ 18 - 3
src/utils/tableData.ts

@@ -20,20 +20,35 @@ export const I3tableC = [
   ['txt', '日期方式', 'dateType'],
   ['txt', '起始流水编号', 'length']
 ]
+export const I4tableC = [
+  // ['txt', '流程类型', 'typeKey'],
+  ['txt', '流程名称', 'name'],
+  ['text', '流程说明', 'remark', 50],
+  ['txtChange', '状态', 'enabled', { 0: '禁用', 1: '启用' }]
+]
+
+export const I4tableC2 = [
+  ['index', '序号'],
+  ['txt', '节点名称', 'name'],
+  ['txt', '排序值', 'sort'],
+  ['txtChange', '办理人', 'type', { user: '指定用户', role: '按角色' }]
+]
+
 export const I6tableC = [
   ['txt', '角色名称', 'roleName'],
   ['text', '角色说明', 'roleDesc', 50],
   ['txt', '排序值', 'sort']
 ]
 
-export const Z1tableC = [
-  ['txt', '用户名', 'userName'],
+export const I7tableC = [
+  ['txt', '登录账号', 'userName'],
+  ['txt', '所属部门', 'deptNameRes'],
   ['txt', '角色', 'roleName'],
   ['txt', '真实姓名', 'realName'],
   ['txt', '创建日期', 'createTime']
 ]
 
-export const Z2tableC = [
+export const I8tableC = [
   ['index', '序号'],
   ['txt', '账号', 'userName'],
   ['txt', '操作日期', 'createTime'],