shaogen1995 1 hari lalu
induk
melakukan
101aa5c3fa

+ 101 - 0
src/components/ZupOne/index.module.scss

@@ -0,0 +1,101 @@
+.ZupOne {
+  width: 100%;
+  height: 100%;
+  position: relative;
+
+  :global {
+    .file_upIcon {
+      color: #a6a6a6;
+      border-radius: 3px;
+      cursor: pointer;
+      font-size: 30px;
+      width: 100px;
+      height: 100px;
+      border: 1px dashed #797979;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+
+    .file_img {
+      width: 100px;
+      height: 126px;
+      position: relative;
+      margin-top: 10px;
+
+      .file_closeBox {
+        position: absolute;
+        right: -10px;
+        top: -10px;
+        z-index: 99;
+        background-color: rgba(0, 0, 0, 0.8);
+        width: 20px;
+        height: 20px;
+        border-radius: 50%;
+        font-size: 16px;
+        color: #fff;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+
+      .file_lookBox {
+        width: 100%;
+        background-color: rgba(0, 0, 0, 0.6);
+        color: #fff;
+        display: flex;
+        justify-content: space-around;
+
+        & > a {
+          color: #fff !important;
+        }
+
+        font-size: 16px;
+      }
+    }
+
+    .file_imgYuan {
+      #ImageLazy {
+        border-radius: 50%;
+        overflow: hidden;
+      }
+    }
+
+    .fileInfo {
+      display: flex;
+      align-items: center;
+      font-size: 16px;
+
+      .clearCover {
+        margin-left: 20px;
+        cursor: pointer;
+        font-size: 16px;
+      }
+
+      & > a {
+        color: black;
+      }
+    }
+
+    .fileBoxRow_r_tit {
+      height: 46px;
+      margin-top: 5px;
+      font-size: 14px;
+      color: rgb(126, 124, 124);
+    }
+
+    .noUpThumb {
+      position: relative;
+      overflow: hidden;
+      opacity: 0;
+      transition: top 0.2s;
+      color: #ff4d4f;
+      top: -10px;
+    }
+
+    .noUpThumbAc {
+      top: 0;
+      opacity: 1;
+    }
+  }
+}

+ 295 - 0
src/components/ZupOne/index.tsx

@@ -0,0 +1,295 @@
+import React, { useCallback, useMemo, useRef, useState } from 'react'
+import styles from './index.module.scss'
+import ImageLazy from '@/components/ImageLazy'
+import {
+  PlusOutlined,
+  EyeOutlined,
+  CloseOutlined,
+  DownloadOutlined,
+  UploadOutlined
+} from '@ant-design/icons'
+import store from '@/store'
+import { baseURL } from '@/utils/http'
+import classNames from 'classnames'
+import { Button } from 'antd'
+import { MessageFu } from '@/utils/message'
+import { fileDomInitialFu } from '@/utils/domShow'
+import { API_upFile } from '@/store/action/layout'
+import { forwardRef, useImperativeHandle } from 'react'
+import MyPopconfirm from '../MyPopconfirm'
+
+type MyTypeType = 'thumb' | 'video' | 'audio' | 'model' | 'pdf' | 'epub'
+
+// 这个组件 只处理 上传 一张图片或者 视频 音频 模型 pdf 的情况
+
+type Props = {
+  fileCheck: boolean //有没有点击过确定
+  dirCode: string //文件的code码
+  myUrl: string //请求地址
+  format: string[] //上传格式 ["image/jpeg", "image/png"] ["video/mp4"] ,application/pdf
+  formatTxt: string //上传图片提示
+  checkTxt: string
+  upTxt: string
+  myType: MyTypeType
+  isLook?: boolean //是不是查看
+  fromData?: any
+  ref: any //当前自己的ref,给父组件调用
+  isTouXiang?: boolean //圆形头像展示
+}
+
+function ZupOne(
+  {
+    fileCheck,
+    dirCode,
+    myUrl,
+    format,
+    formatTxt,
+    checkTxt,
+    upTxt,
+    myType,
+    isLook = false,
+    fromData,
+    isTouXiang
+  }: Props,
+  ref: any
+) {
+  const [fileUrl, setFileUrl] = useState({
+    fileName: '',
+    filePath: '',
+    thumb: '' //压缩图
+  })
+
+  const myInput = useRef<HTMLInputElement>(null)
+
+  // 上传封面图
+  const handeUpPhoto = useCallback(
+    async (e: React.ChangeEvent<HTMLInputElement>) => {
+      if (e.target.files) {
+        // 拿到files信息
+        const filesInfo = e.target.files[0]
+        // console.log("-----", filesInfo.type);
+
+        // 校验格式
+        const type = format
+
+        if (myType === 'pdf') {
+          if (!filesInfo.type.includes('pdf')) {
+            e.target.value = ''
+            return MessageFu.warning(`只支持${formatTxt}格式!`)
+          }
+        } else if (myType === 'epub') {
+          if (!filesInfo.name.endsWith('.epub')) {
+            e.target.value = ''
+            return MessageFu.warning(`只支持${formatTxt}格式!`)
+          }
+        } else {
+          if (!type.includes(filesInfo.type)) {
+            e.target.value = ''
+            return MessageFu.warning(`只支持${formatTxt}格式!`)
+          }
+        }
+
+        // 校验大小
+        // if (filesInfo.size > size * 1024 * 1024) {
+        //   e.target.value = ''
+        //   return MessageFu.warning(`最大支持${size}M!`)
+        // }
+        // 创建FormData对象
+        const fd = new FormData()
+        // 把files添加进FormData对象(‘photo’为后端需要的字段)
+        let myTypeRes: string = myType
+        if (['pdf', 'epub'].includes(myTypeRes)) myTypeRes = 'doc'
+        fd.append('type', myTypeRes === 'thumb' ? 'img' : myTypeRes)
+        fd.append('dirCode', dirCode)
+        fd.append('file', filesInfo)
+
+        if (fromData) {
+          for (const k in fromData) {
+            if (fromData[k]) fd.append(k, fromData[k])
+          }
+        }
+
+        // 开启压缩图片
+        fd.append('isCompress', 'true')
+
+        e.target.value = ''
+
+        try {
+          const res = await API_upFile(fd, myUrl)
+          if (res.code === 0) {
+            MessageFu.success('上传成功!')
+            setFileUrl(res.data)
+          }
+          fileDomInitialFu()
+        } catch (error) {
+          fileDomInitialFu()
+        }
+      }
+    },
+    [dirCode, format, formatTxt, fromData, myType, myUrl]
+  )
+
+  // 让父组件调用的 回显 附件 地址
+  const setFileComFileFu = useCallback(
+    (valObj: { fileName: string; filePath: string; thumb: string }) => {
+      setFileUrl(valObj)
+    },
+    []
+  )
+
+  // 让父组件调用的返回 附件 名字和路径
+  const fileComFileResFu = useCallback(() => {
+    return fileUrl
+  }, [fileUrl])
+
+  // 可以让父组件调用子组件的方法
+  useImperativeHandle(ref, () => ({
+    setFileComFileFu,
+    fileComFileResFu
+  }))
+
+  const acceptRes = useMemo(() => {
+    let accept = '.png,.jpg,.jpeg'
+    if (myType === 'video') accept = '.mp4'
+    else if (myType === 'audio') accept = '.mp3'
+    else if (myType === 'model') accept = '.4dage'
+    else if (myType === 'pdf') accept = '.pdf'
+    else if (myType === 'epub') accept = '.epub'
+    return accept
+  }, [myType])
+
+  // 点击 预览(除了图片)
+  const lookFileNoImgFu = useCallback(
+    (type: MyTypeType) => {
+      if (type === 'pdf' || type === 'thumb') {
+        // 新窗口打开
+        window.open(baseURL + fileUrl.filePath)
+      } else if (type !== 'epub') {
+        store.dispatch({
+          type: 'layout/lookDom',
+          payload: { src: fileUrl.filePath, type }
+        })
+      }
+
+      // if (type === "pdf") {
+      // } else {
+      // }
+    },
+    [fileUrl.filePath]
+  )
+
+  return (
+    <div className={styles.ZupOne}>
+      <input
+        id='upInput'
+        type='file'
+        accept={acceptRes}
+        ref={myInput}
+        onChange={e => handeUpPhoto(e)}
+      />
+      {myType === 'thumb' ? (
+        <div
+          hidden={fileUrl.filePath !== ''}
+          className='file_upIcon'
+          onClick={() => myInput.current?.click()}
+        >
+          <PlusOutlined rev={undefined} />
+        </div>
+      ) : (
+        <Button
+          hidden={fileUrl.filePath !== ''}
+          onClick={() => myInput.current?.click()}
+          icon={<UploadOutlined rev={undefined} />}
+        >
+          上传
+        </Button>
+      )}
+
+      {/* 为图片的情况-------------- */}
+      {myType === 'thumb' ? (
+        <div
+          className={classNames('file_img', isTouXiang ? 'file_imgYuan' : '')}
+          hidden={fileUrl.filePath === ''}
+        >
+          {fileUrl ? (
+            <ImageLazy
+              width={100}
+              height={100}
+              srcBig={fileUrl.filePath}
+              src={fileUrl.thumb}
+              noLook
+            />
+          ) : null}
+
+          {/* 删除 */}
+          <div className='file_closeBox' hidden={isLook}>
+            <MyPopconfirm
+              txtK='删除'
+              onConfirm={() => setFileUrl({ fileName: '', filePath: '', thumb: '' })}
+              Dom={<CloseOutlined rev={undefined} />}
+            />
+          </div>
+
+          {/* 预览 下载 */}
+          <div className='file_lookBox' hidden={isTouXiang}>
+            <EyeOutlined
+              onClick={() =>
+                store.dispatch({
+                  type: 'layout/lookBigImg',
+                  payload: { url: baseURL + fileUrl.filePath, show: true }
+                })
+              }
+              rev={undefined}
+            />
+            <a href={baseURL + fileUrl.filePath} download target='_blank' rel='noreferrer'>
+              <DownloadOutlined rev={undefined} />
+            </a>
+          </div>
+        </div>
+      ) : fileUrl.filePath ? (
+        <div className='fileInfo'>
+          <div className='upSuccTxt'>{fileUrl.fileName}</div>
+          {/* 视频预览 */}
+          <div
+            className='clearCover'
+            hidden={!fileUrl.filePath || myType === 'epub'}
+            onClick={() => lookFileNoImgFu(myType)}
+          >
+            <EyeOutlined rev={undefined} />
+          </div>
+          {/* 视频下载 */}
+          <a
+            href={baseURL + fileUrl.filePath}
+            download
+            target='_blank'
+            className='clearCover'
+            rel='noreferrer'
+          >
+            <DownloadOutlined rev={undefined} />
+          </a>
+          {/* 视频删除 */}
+
+          {isLook ? null : (
+            <MyPopconfirm
+              txtK='删除'
+              onConfirm={() => setFileUrl({ fileName: '', filePath: '', thumb: '' })}
+              Dom={<CloseOutlined className='clearCover' rev={undefined} />}
+            />
+          )}
+        </div>
+      ) : null}
+
+      <div className='fileBoxRow_r_tit' hidden={isLook}>
+        格式要求:支持{formatTxt}格式。{upTxt}
+        <br />
+        <div
+          className={classNames('noUpThumb', !fileUrl.filePath && fileCheck ? 'noUpThumbAc' : '')}
+        >
+          {checkTxt}
+        </div>
+      </div>
+    </div>
+  )
+}
+
+export default forwardRef(ZupOne)

+ 35 - 0
src/pages/Abench/A2bench/A2editUser/index.module.scss

@@ -0,0 +1,35 @@
+.A2editUser {
+  :global {
+    .ant-modal-close {
+      display: none;
+    }
+    .ant-modal {
+      width: 800px !important;
+    }
+    .A2Emain {
+      border-top: 1px solid #999999;
+      padding-top: 15px;
+      width: 100%;
+
+      // 封面
+      .formRow {
+        display: flex;
+        margin-bottom: 24px;
+        .formLeft {
+          width: 100px;
+          text-align: right;
+          position: relative;
+          top: 4px;
+          & > span {
+            color: #ff4d4f;
+          }
+        }
+      }
+
+      .A2Ebtn {
+        margin-top: 20px;
+        text-align: center;
+      }
+    }
+  }
+}

+ 120 - 0
src/pages/Abench/A2bench/A2editUser/index.tsx

@@ -0,0 +1,120 @@
+import React, { useCallback, useEffect, useRef, useState } from 'react'
+import styles from './index.module.scss'
+import { Button, Input, Modal } from 'antd'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { MessageFu } from '@/utils/message'
+import { UserTableListType } from '@/pages/Isystem/I7user/data'
+import { A2_APIeditUser } from '@/store/action/Abench/A2bench'
+import ZupOne from '@/components/ZupOne'
+
+type Props = {
+  closeFu: () => void
+  userInfo: UserTableListType
+  succFu: (obj: any) => void
+}
+
+function A2editUser({ closeFu, userInfo, succFu }: Props) {
+  const [realName, setRealName] = useState('')
+
+  // 头像的ref
+  const ZupThumbRef = useRef<any>(null)
+
+  useEffect(() => {
+    setRealName(userInfo.realName)
+    // 设置头像
+    ZupThumbRef.current?.setFileComFileFu({
+      fileName: '',
+      filePath: userInfo.thumb,
+      thumb: userInfo.thumb
+    })
+  }, [userInfo])
+
+  const [fileCheck, setFileCheck] = useState(false)
+
+  const btnOk = useCallback(async () => {
+    setFileCheck(true)
+
+    // 头像
+    const coverUrl1 = ZupThumbRef.current?.fileComFileResFu()
+
+    if (!coverUrl1.thumb) return
+
+    const obj = {
+      id: userInfo.id,
+      realName,
+      thumb: coverUrl1.thumb
+    }
+
+    const res = await A2_APIeditUser(obj)
+
+    if (res.code === 0) {
+      MessageFu.success('编辑成功')
+      succFu(obj)
+      closeFu()
+    }
+  }, [closeFu, realName, succFu, userInfo.id])
+
+  return (
+    <Modal
+      wrapClassName={styles.A2editUser}
+      destroyOnClose
+      open={true}
+      title='个人资料'
+      footer={
+        [] // 设置footer为空,去掉 取消 确定默认按钮
+      }
+    >
+      <div className='A2Emain'>
+        <div className='formRow'>
+          <div className='formLeft'>
+            <span> * </span>真实姓名:
+          </div>
+          <div className='formRight'>
+            <Input
+              style={{ width: 300 }}
+              maxLength={10}
+              showCount
+              placeholder='请输入内容'
+              value={realName}
+              onChange={e => setRealName(e.target.value.replace(/\s+/g, ''))}
+            />
+          </div>
+        </div>
+
+        {/* 封面 */}
+        <div className='formRow'>
+          <div className='formLeft'>
+            <span> * </span> 头像:
+          </div>
+          <div className='formRight'>
+            <ZupOne
+              ref={ZupThumbRef}
+              isLook={false}
+              fileCheck={fileCheck}
+              dirCode='businessEditUser'
+              myUrl='sys/user/upload'
+              format={['image/jpeg', 'image/png']}
+              formatTxt='png、jpg和jpeg'
+              checkTxt='请上传头像!'
+              upTxt='最多1张'
+              myType='thumb'
+              isTouXiang={true}
+            />
+          </div>
+        </div>
+
+        <div className='A2Ebtn'>
+          <Button type='primary' onClick={btnOk}>
+            提交
+          </Button>
+          &emsp;
+          <MyPopconfirm txtK='取消' onConfirm={closeFu} />
+        </div>
+      </div>
+    </Modal>
+  )
+}
+
+const MemoA2editUser = React.memo(A2editUser)
+
+export default MemoA2editUser

+ 59 - 0
src/pages/Abench/A2bench/A2setStock/index.module.scss

@@ -0,0 +1,59 @@
+.A2setStock {
+  :global {
+    .ant-modal-close {
+      display: none;
+    }
+    .ant-modal {
+      width: 800px !important;
+    }
+    .ant-modal-body {
+      border-top: 1px solid #ccc;
+      .A2Smain {
+        margin-top: 20px;
+
+        .Z5eboxrr {
+          width: 100%;
+          .Z5eRow {
+            margin-bottom: 10px;
+            display: flex;
+
+            .Z5eRow1 {
+              width: 70px;
+              font-weight: 700;
+              text-align: right;
+              margin-right: 10px;
+            }
+
+            .Z5eRow2 {
+              width: calc(100% - 80px);
+            }
+          }
+
+          .Z5eErr {
+            margin-bottom: 20px;
+            text-align: center;
+            color: #ff4d4f;
+            opacity: 0;
+            pointer-events: none;
+            transition: all 0.3s;
+            position: relative;
+            top: -10px;
+          }
+
+          .Z5eErrAc {
+            opacity: 1;
+            top: 0;
+          }
+          .Z5eboxrr_1 {
+            margin-top: 5px;
+          }
+        }
+
+        .A2Sbtn {
+          margin-top: 20px;
+          text-align: center;
+        }
+      }
+    }
+  }
+}

+ 117 - 0
src/pages/Abench/A2bench/A2setStock/index.tsx

@@ -0,0 +1,117 @@
+import React, { useCallback, useEffect, useMemo, useState } from 'react'
+import styles from './index.module.scss'
+import { Button, Checkbox, Modal } from 'antd'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import classNmaes from 'classnames'
+import { MessageFu } from '@/utils/message'
+import { A2_APIsetStock } from '@/store/action/Abench/A2bench'
+import { RouterType } from '@/pages/Layout/data'
+
+type Props = {
+  sId: number
+  arr: RouterType
+  closeFu: () => void
+  succFu: () => void
+}
+
+function A2setStock({ arr, closeFu, succFu, sId }: Props) {
+  const [roleArr, setRoleArr] = useState<RouterType>([])
+
+  useEffect(() => {
+    setRoleArr(arr)
+  }, [arr])
+
+  // 多选框变化
+  const onChange = useCallback(
+    (val: boolean, id1: number, id2: number) => {
+      setRoleArr(
+        roleArr.map(v => ({
+          ...v,
+          son:
+            v.id === id1
+              ? v.son.map(c => ({
+                  ...c,
+                  authority: c.id === id2 ? val : c.authority
+                }))
+              : v.son
+        }))
+      )
+    },
+    [roleArr]
+  )
+
+  // 二级选中的数组id集合
+  const checkIds = useMemo(() => {
+    const arr: number[] = []
+    roleArr.forEach(v => {
+      v.son.forEach(c => {
+        if (c.authority) arr.push(c.id)
+      })
+    })
+    return arr
+  }, [roleArr])
+
+  // 点击提交
+  const btnOk = useCallback(async () => {
+    const res = await A2_APIsetStock(sId, JSON.stringify(roleArr))
+    if (res.code === 0) {
+      MessageFu.success('设置成功')
+      succFu()
+      closeFu()
+    }
+  }, [closeFu, roleArr, sId, succFu])
+
+  return (
+    <Modal
+      wrapClassName={styles.A2setStock}
+      open={true}
+      title='常用功能'
+      footer={
+        [] // 设置footer为空,去掉 取消 确定默认按钮
+      }
+    >
+      <div className='A2Smain'>
+        <div className='Z5eboxrr'>
+          {roleArr.map(v => (
+            <div
+              key={v.id}
+              className='Z5eRow'
+              hidden={v.son.length === 0 || (v.son.length === 1 && v.son[0].name === '工作台')}
+            >
+              <div className='Z5eRow1'>{v.name}</div>
+              <div className='Z5eRow2'>
+                {v.son.map(c =>
+                  c.name === '工作台' ? null : (
+                    <Checkbox
+                      key={c.id}
+                      checked={c.authority}
+                      onChange={e => onChange(e.target.checked, v.id, c.id)}
+                    >
+                      {c.name}
+                    </Checkbox>
+                  )
+                )}
+              </div>
+            </div>
+          ))}
+
+          <div className={classNmaes('Z5eErr', checkIds.length <= 0 ? 'Z5eErrAc' : '')}>
+            至少选中一个
+          </div>
+        </div>
+
+        <div className='A2Sbtn'>
+          <Button type='primary' disabled={checkIds.length <= 0} onClick={btnOk}>
+            提交
+          </Button>
+          &emsp;
+          <MyPopconfirm txtK='取消' onConfirm={closeFu} />
+        </div>
+      </div>
+    </Modal>
+  )
+}
+
+const MemoA2setStock = React.memo(A2setStock)
+
+export default MemoA2setStock

+ 50 - 0
src/pages/Abench/A2bench/A2table/index.module.scss

@@ -0,0 +1,50 @@
+.A2table {
+  width: 100%;
+  padding: 20px;
+  background-color: #fff;
+  border-radius: 10px;
+  margin-top: 20px;
+
+  :global {
+    .A2Ttop {
+      display: flex;
+      justify-content: space-between;
+      margin-bottom: 15px;
+
+      .A2TtopLL {
+        display: flex;
+        align-items: center;
+        .ant-btn {
+          margin-right: 15px;
+        }
+        & > div {
+          font-weight: 700;
+          font-size: 18px;
+          position: relative;
+          padding-left: 16px;
+          margin-right: 20px;
+          &::before {
+            content: '';
+            position: absolute;
+            top: 48%;
+            left: 0;
+            transform: translateY(-50%);
+            width: 5px;
+            height: 20px;
+            background-color: var(--themeColor);
+          }
+        }
+      }
+
+      .A2TtopRR {
+        display: flex;
+        & > div {
+          margin-left: 15px;
+        }
+      }
+    }
+    .ant-table-cell {
+      padding: 8px !important;
+    }
+  }
+}

+ 216 - 0
src/pages/Abench/A2bench/A2table/index.tsx

@@ -0,0 +1,216 @@
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
+import styles from './index.module.scss'
+import { Button, DatePicker, Input, Select } from 'antd'
+import tabLeftArr, { RouterTypeRow } from '@/pages/Layout/data'
+import MyTable from '@/components/MyTable'
+import { MessageFu } from '@/utils/message'
+import { A2_APIgetList } from '@/store/action/Abench/A2bench'
+import { GI5tableType } from '@/pages/ZgoodsInfo/data'
+import { authorityFu, tableListAuditBtnFu } from '@/utils/authority'
+import history from '@/utils/history'
+import { selectObj } from '@/utils/dataChange'
+import { GI5tableC } from '@/utils/tableData'
+
+const { RangePicker } = DatePicker
+
+const btnArr = [
+  { name: '我发起的', key: '1' },
+  { name: '待我审批', key: '2' }
+]
+
+function A2table() {
+  // 路由信息过滤过来
+  const typePageArr = useMemo(() => {
+    const arr: RouterTypeRow[] = []
+    tabLeftArr.forEach(v1 => {
+      v1.son.forEach(v2 => {
+        if (v2.pageType) arr.push(v2)
+      })
+    })
+    return arr
+  }, [])
+
+  const [formData, setFormData] = useState({
+    pageNum: 1,
+    pageSize: 10,
+    auditType: '1',
+    type: '',
+    num: '',
+    startTime: '',
+    endTime: '',
+    status: ''
+  })
+
+  const getListFu = useCallback(async () => {
+    const res = await A2_APIgetList(formData)
+    if (res.code === 0) {
+      setTableObj({ list: res.data.records || [], total: res.data.total })
+    }
+  }, [formData])
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu])
+
+  // 时间选择器改变
+  const timeChange = useCallback(
+    (date: any, dateString: any) => {
+      let startTime = ''
+      let endTime = ''
+      if (dateString[0] && dateString[1]) {
+        startTime = dateString[0] + ' 00:00:00'
+        endTime = dateString[1] + ' 23:59:59'
+      }
+      setFormData({ ...formData, startTime, endTime, pageNum: 1 })
+    },
+    [formData]
+  )
+
+  // 页码变化
+  const paginationChange = useCallback(
+    (pageNum: number, pageSize: number) => {
+      setFormData({ ...formData, pageNum, pageSize })
+    },
+    [formData]
+  )
+
+  // 输入框的输入
+  const timeRef = useRef(-1)
+  const txtChangeFu = useCallback(
+    (e: React.ChangeEvent<HTMLInputElement>, key: 'num') => {
+      clearTimeout(timeRef.current)
+      timeRef.current = window.setTimeout(() => {
+        setFormData({
+          ...formData,
+          [key]: e.target.value.replaceAll("'", ''),
+          pageNum: 1
+        })
+      }, 500)
+    },
+    [formData]
+  )
+
+  const [tableObj, setTableObj] = useState<{ list: GI5tableType[]; total: number }>({
+    list: [],
+    total: 0
+  })
+
+  const btnFu = useCallback((pageKey: '3' | '4', obj: any, id: number) => {
+    if (obj) {
+      authorityFu(obj.id, obj.name, () => history.push(`${obj.path}_edit/${pageKey}/${id}`))
+    } else MessageFu.warning('业务类型错误')
+  }, [])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: any) => {
+          const obj = typePageArr.find(v => v.pageType === item.type)
+          return (
+            <>
+              <Button size='small' type='text' onClick={() => btnFu('4', obj, item.id)}>
+                查看
+              </Button>
+
+              {tableListAuditBtnFu(item) ? (
+                <Button size='small' type='text' onClick={() => btnFu('3', obj, item.id)}>
+                  审批
+                </Button>
+              ) : null}
+            </>
+          )
+        }
+      }
+    ]
+  }, [btnFu, typePageArr])
+
+  const staBtn = useMemo(() => {
+    return [
+      {
+        title: '业务类型',
+        render: (item: GI5tableType) => {
+          let txt = '(空)'
+          const obj = typePageArr.find(v => v.pageType === item.type)
+          if (obj) txt = obj.name
+          return txt
+        }
+      }
+    ]
+  }, [typePageArr])
+
+  return (
+    <div className={styles.A2table}>
+      <div className='A2Ttop'>
+        <div className='A2TtopLL'>
+          <div>申请管理</div>
+          {btnArr.map(v => (
+            <Button
+              onClick={() => setFormData({ ...formData, auditType: v.key, pageNum: 1 })}
+              key={v.key}
+              type={formData.auditType === v.key ? 'primary' : 'default'}
+            >
+              {v.name}
+            </Button>
+          ))}
+        </div>
+        <div className='A2TtopRR'>
+          <div>
+            <Select
+              allowClear={true}
+              placeholder='业务类型'
+              style={{ width: 150 }}
+              value={formData.type ? formData.type : null}
+              onChange={e => setFormData({ ...formData, type: e, pageNum: 1 })}
+              options={typePageArr.map(v => ({ value: v.pageType, label: v.name }))}
+            />
+          </div>
+
+          <div>
+            <Input
+              style={{ width: 150 }}
+              placeholder='请输入业务编号'
+              maxLength={30}
+              onChange={e => txtChangeFu(e, 'num')}
+            />
+          </div>
+
+          <div>
+            <RangePicker
+              style={{ width: 260 }}
+              onChange={timeChange}
+              placeholder={['发起日期开始', '发起日期结束']}
+            />
+          </div>
+
+          <div>
+            <Select
+              allowClear={true}
+              placeholder='申请状态'
+              style={{ width: 150 }}
+              value={formData.status ? formData.status : null}
+              onChange={e => setFormData({ ...formData, status: e, pageNum: 1 })}
+              options={selectObj['订单审批状态']}
+            />
+          </div>
+        </div>
+      </div>
+
+      {/* 表格 */}
+      <MyTable
+        list={tableObj.list}
+        columnsTemp={GI5tableC(true)}
+        lastBtn={tableLastBtn}
+        staBtn={staBtn}
+        pageNum={formData.pageNum}
+        pageSize={formData.pageSize}
+        total={tableObj.total}
+        onChange={(pageNum, pageSize) => paginationChange(pageNum, pageSize)}
+      />
+    </div>
+  )
+}
+
+const MemoA2table = React.memo(A2table)
+
+export default MemoA2table

+ 119 - 0
src/pages/Abench/A2bench/index.module.scss

@@ -1,4 +1,123 @@
 .A2bench {
+  display: flex;
+  justify-content: space-between;
+  font-size: 16px;
   :global {
+    .A2tit {
+      height: 52px;
+      font-weight: 700;
+      font-size: 18px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      margin-bottom: 10px;
+      position: relative;
+      padding-left: 16px;
+      &::before {
+        content: '';
+        position: absolute;
+        top: 48%;
+        left: 0;
+        transform: translateY(-50%);
+        width: 5px;
+        height: 20px;
+        background-color: var(--themeColor);
+      }
+    }
+    .A2none {
+      width: 100%;
+      height: 70px;
+      font-weight: 700;
+      font-size: 18px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+
+    .A2ll {
+      width: 100%;
+      height: 100%;
+      overflow-y: auto;
+
+      .A2ll1 {
+        height: 100px;
+        background-color: #fff;
+        border-radius: 10px;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        padding: 0 24px;
+        .A2ll1_1 {
+          display: flex;
+          img {
+            width: 70px;
+            height: 70px;
+            border-radius: 50%;
+          }
+          .A2ll1_1Txt {
+            margin-left: 30px;
+            & > h1 {
+              font-size: 18px;
+            }
+            & > p {
+              margin-top: 20px;
+            }
+          }
+        }
+      }
+
+      .A2ll2 {
+        margin-top: 15px;
+        display: flex;
+        justify-content: space-between;
+
+        .A2ll2_1 {
+          width: 100%;
+          padding: 10px 20px 0px;
+          background-color: #fff;
+          border-radius: 10px;
+        }
+        // .A2ll2_2 {
+        //   width: 500px;
+        //   margin-left: 20px;
+        //   padding: 10px 20px 0px;
+        //   background-color: #fff;
+        //   border-radius: 10px;
+        // }
+
+        .A2ll2RowBox {
+          display: flex;
+          flex-wrap: wrap;
+          align-items: center;
+          .A2ll2Row {
+            cursor: pointer;
+            transition: all 0.3s;
+            margin-right: 20px;
+            margin-bottom: 20px;
+            height: 90px;
+            width: 100px;
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            align-items: center;
+            & > img {
+              width: 40px;
+              height: auto;
+              transition: all 0.3s;
+            }
+            & > p {
+              font-size: 14px;
+              margin-top: 10px;
+            }
+            &:hover {
+              color: var(--themeColor);
+              & > img {
+                transform: scale(1.1);
+              }
+            }
+          }
+        }
+      }
+    }
   }
 }

+ 162 - 1
src/pages/Abench/A2bench/index.tsx

@@ -1,9 +1,170 @@
-import React from 'react'
+import React, { useCallback, useEffect, useState } from 'react'
 import styles from './index.module.scss'
+import { useDispatch, useSelector } from 'react-redux'
+import store, { RootState } from '@/store'
+import { Button } from 'antd'
+import { baseURL, iconUrl } from '@/utils/http'
+import baseTouXiangImg from '@/assets/img/user.png'
+import { getTokenInfo, removeTokenInfo, setTokenInfo } from '@/utils/storage'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import history from '@/utils/history'
+import { getUserInfoByIdAPI } from '@/store/action/Isystem/I7user'
+import { RouterType } from '@/pages/Layout/data'
+import { treeLastIdFindFatherFu } from '@/utils/dataChange'
+import { I5_APIgetTree } from '@/store/action/Isystem/I5organization'
+import A2table from './A2table'
+import A2setStock from './A2setStock'
+import A2editUser from './A2editUser'
+
+const userInfoJting = getTokenInfo().user || {}
+
 function A2bench() {
+  // 设置常用功能
+  const userRolePermissions = useSelector((state: RootState) => state.A0Layout.userRolePermissions)
+  const [stockShow, setStockShow] = useState(false)
+  const [stockList, setStockList] = useState<RouterType>([])
+
+  const getUserInfo = useCallback(async () => {
+    const res = await getUserInfoByIdAPI(userInfoJting.id)
+    if (res.code === 0) {
+      store.dispatch({ type: 'layout/userInfo', payload: res.data })
+      // 设置常用功能
+      if (res.data.permRtf) {
+        setStockList(JSON.parse(res.data.permRtf || '[]'))
+      } else setStockList(userRolePermissions)
+    }
+  }, [userRolePermissions])
+
+  useEffect(() => {
+    getUserInfo()
+  }, [getUserInfo])
+
+  // 获取组织管理列表
+  const dispatch = useDispatch()
+  useEffect(() => {
+    dispatch(I5_APIgetTree())
+  }, [dispatch])
+
+  const { treeData } = useSelector((state: RootState) => state.I5organization)
+
+  const { userInfo } = useSelector((state: RootState) => state.A0Layout)
+
+  // 点击退出登录
+  const loginExit = () => {
+    removeTokenInfo()
+    history.push('/login')
+  }
+
+  // 点击编辑个人资料
+  const [editUser, setEditUser] = useState(false)
+
+  // 更新用户信息
+  const upUserInfoFu = useCallback(
+    (obj: any) => {
+      const userInfoOld = getTokenInfo()
+      setTokenInfo({
+        ...userInfoOld,
+        user: {
+          ...userInfoOld.user,
+          thumb: obj.thumb,
+          realName: obj.realName
+        }
+      })
+      getUserInfo()
+    },
+    [getUserInfo]
+  )
+
   return (
     <div className={styles.A2bench}>
       <div className='pageTitle'>工作台</div>
+      <div className='A2ll'>
+        {/* 顶部盒子 */}
+        <div className='A2ll1'>
+          <div className='A2ll1_1'>
+            <img src={userInfo.thumb ? baseURL + userInfo.thumb : baseTouXiangImg} alt='' />
+            <div className='A2ll1_1Txt'>
+              <h1>{userInfo.realName || userInfo.userName || '匿名'}</h1>
+              <p>
+                {userInfo.userName}&emsp;
+                {userInfo.deptId
+                  ? treeLastIdFindFatherFu(treeData, userInfo.deptId + '', 'name').join(' / ')
+                  : '-'}
+                &emsp;|&emsp;{userInfo.roleName}
+              </p>
+            </div>
+          </div>
+          <div className='A2ll1_2'>
+            <Button onClick={() => setEditUser(true)}>编辑个人资料</Button>&emsp;
+            <Button onClick={() => store.dispatch({ type: 'layout/passEditShow', payload: true })}>
+              修改密码
+            </Button>
+            &emsp;
+            <MyPopconfirm
+              txtK='退出登录'
+              onConfirm={loginExit}
+              Dom={<Button>退出登录</Button>}
+              loc='bottom'
+            />
+          </div>
+        </div>
+        <div className='A2ll2'>
+          {/* 常用功能*/}
+          <div className='A2ll2_1'>
+            <div className='A2tit'>
+              <div>常用功能</div>
+              <div>
+                <Button onClick={() => setStockShow(true)}>设置</Button>
+              </div>
+            </div>
+            <div className='A2ll2RowBox'>
+              {stockList.map(v1 =>
+                v1.son.map(v2 =>
+                  v2.authority && v2.name !== '业务中心' ? (
+                    <div key={v2.id} className='A2ll2Row' onClick={() => history.push(v2.path)}>
+                      <img src={`${iconUrl}/${v2.name}.png`} alt='' />
+                      <p>{v2.name}</p>
+                    </div>
+                  ) : null
+                )
+              )}
+            </div>
+          </div>
+          {/* 最近使用 */}
+          {/* <div className='A2ll2_2'>
+            <div className='A2tit'>最近使用</div>
+            <div className='A2ll2RowBox'>
+              {changGetFu().length ? (
+                changGetFu().map((v, i) => (
+                  <div key={i} className='A2ll2Row' onClick={() => history.push(v.path)}>
+                    <img src={`${baseURL}/baseData/tabImg/${v.name}.png`} alt='' />
+                    <p>{v.name}</p>
+                  </div>
+                ))
+              ) : (
+                <div className='A2none'>暂无信息</div>
+              )}
+            </div>
+          </div> */}
+        </div>
+        {/* 表格 */}
+        <A2table />
+      </div>
+
+      {/* 编辑个人资料 */}
+      {editUser ? (
+        <A2editUser closeFu={() => setEditUser(false)} userInfo={userInfo} succFu={upUserInfoFu} />
+      ) : null}
+
+      {/* 设置常用功能 */}
+      {stockShow ? (
+        <A2setStock
+          sId={userInfoJting.id}
+          arr={stockList}
+          closeFu={() => setStockShow(false)}
+          succFu={getUserInfo}
+        />
+      ) : null}
     </div>
   )
 }

+ 9 - 3
src/pages/Layout/index.module.scss

@@ -135,13 +135,19 @@
 
           .userNameBox {
             cursor: pointer;
-            background: url('../../assets/img/user.png') no-repeat left center;
-            background-size: 40px 40px;
-            padding-left: 46px;
+            // background: url('../../assets/img/user.png') no-repeat left center;
+            // background-size: 40px 40px;
+            // padding-left: 46px;
             height: 60px;
             display: flex;
             align-items: center;
             color: #fff;
+            img {
+              border-radius: 50%;
+              width: 40px;
+              height: 40px;
+              margin-right: 20px;
+            }
           }
 
           .userInco {

+ 32 - 17
src/pages/Layout/index.tsx

@@ -8,20 +8,22 @@ import { Button, Form, Input, Modal } from 'antd'
 import { Base64 } from 'js-base64'
 import encodeStr from '@/utils/pass'
 import { passWordEditAPI } from '@/store/action/layout'
-import { changSetFu, getTokenInfo, removeTokenInfo } from '@/utils/storage'
+import { getTokenInfo, removeTokenInfo } from '@/utils/storage'
 import { MessageFu } from '@/utils/message'
 import NotFound from '@/components/NotFound'
 import classNames from 'classnames'
 import tabLeftArr, { routerSon, RouterType, RouterTypeRow } from './data'
 import MyPopconfirm from '@/components/MyPopconfirm'
-import store from '@/store'
+import store, { RootState } from '@/store'
 import SpinLodingSon from '@/components/SpinLodingSon'
 import { DownOutlined, RightOutlined } from '@ant-design/icons'
 import { I6_APIgetInfo } from '@/store/action/Isystem/I6role'
 import { TypeI6Role } from '../Isystem/I6role/data'
-import { useDispatch } from 'react-redux'
+import { useDispatch, useSelector } from 'react-redux'
 import { I2_APIgetDict } from '@/store/action/Isystem/I2dict'
 import { E1_APIgetTree } from '@/store/action/Eculture/E1tag'
+import { baseURL } from '@/utils/http'
+import baseTouXiangImg from '@/assets/img/user.png'
 
 function Layout() {
   const [loding, setLoding] = useState(false)
@@ -39,8 +41,12 @@ function Layout() {
   }, [dispatch])
 
   useEffect(() => {
+    // 用户信息存到仓库
+    store.dispatch({ type: 'layout/userInfo', payload: (getTokenInfo() || {}).user })
     getListFu()
   }, [getListFu])
+  // 获取用户信息
+  const { userInfo, passEditShow } = useSelector((state: RootState) => state.A0Layout)
 
   // 当前路径选中的左侧菜单
   const location = useLocation()
@@ -123,20 +129,23 @@ function Layout() {
       const tempArr: RouterTypeRow[] = []
 
       // 权限数据存到仓库
-      const roleArrStoreArr: RouterTypeRow[] = []
+      const roleArrStoreArr: RouterType = []
 
       tabLeftArr.forEach(v1 => {
         if (v1.son && v1.son[0]) {
+          const obj = {
+            ...v1,
+            son: [] as RouterTypeRow[]
+          }
+
           v1.son.forEach(v2 => {
             if (isOkIdArr.includes(v2.id)) {
               tempArr.push(v2)
-
               // 过滤掉 藏品详情 页
-              if (v2.id < 9901) {
-                roleArrStoreArr.push({ ...v2, authority: true })
-              }
+              if (v2.id < 9901) obj.son.push({ ...v2, authority: true })
             }
           })
+          roleArrStoreArr.push(obj)
         }
       })
 
@@ -195,12 +204,9 @@ function Layout() {
   // 点击跳转
   const pathCutFu = useCallback((item: RouterTypeRow) => {
     history.push(item.path)
-    if (item.name !== '工作台') changSetFu(item)
+    // if (item.name !== '工作台') changSetFu(item)
   }, [])
 
-  // 修改密码相关
-  const [open, setOpen] = useState(false)
-
   // 拿到新密码的输入框的值
   const oldPasswordValue = useRef('')
 
@@ -219,6 +225,7 @@ function Layout() {
     const res: any = await passWordEditAPI(obj)
     if (res.code === 0) {
       MessageFu.success('修改成功!')
+      store.dispatch({ type: 'layout/passEditShow', payload: false })
       loginExit()
     }
   }
@@ -298,7 +305,9 @@ function Layout() {
             onMouseLeave={() => setIsUserBtnShow(false)}
           >
             <div className='userNameBox' onClick={() => setIsUserBtnShow(true)}>
-              {getTokenInfo().user.realName || getTokenInfo().user.userName || '匿名'}
+              <img src={userInfo.thumb ? baseURL + userInfo.thumb : baseTouXiangImg} alt='' />
+
+              {userInfo.realName || userInfo.userName || '匿名'}
 
               <div className='userInco userInco2'>
                 <CaretRightOutlined />
@@ -307,7 +316,11 @@ function Layout() {
 
             <div className='userSet'>
               <div>
-                <span onClick={() => setOpen(true)}>修改密码</span>
+                <span
+                  onClick={() => store.dispatch({ type: 'layout/passEditShow', payload: true })}
+                >
+                  修改密码
+                </span>
                 <MyPopconfirm txtK='退出登录' onConfirm={loginExit} Dom='退出登录' loc='bottom' />
               </div>
             </div>
@@ -340,9 +353,9 @@ function Layout() {
       {/* 点击修改密码打开的对话框 */}
       <Modal
         destroyOnClose
-        open={open}
+        open={passEditShow}
         title='修改密码'
-        onCancel={() => setOpen(false)}
+        onCancel={() => store.dispatch({ type: 'layout/passEditShow', payload: false })}
         footer={
           [] // 设置footer为空,去掉 取消 确定默认按钮
         }
@@ -389,7 +402,9 @@ function Layout() {
           </Form.Item>
 
           <Form.Item wrapperCol={{ offset: 14, span: 16 }}>
-            <Button onClick={() => setOpen(false)}>取消</Button>
+            <Button onClick={() => store.dispatch({ type: 'layout/passEditShow', payload: false })}>
+              取消
+            </Button>
             &emsp;
             <Button type='primary' htmlType='submit'>
               确定

+ 2 - 2
src/pages/ZgoodsInfo/GItab5/index.tsx

@@ -52,7 +52,7 @@ function GItab5({ goodId }: Props) {
               size='small'
               type='text'
               onClick={() => {
-                console.log(item)
+                // console.log(item)
                 const obj = list.find(v => v.value === item.type)
                 if (obj) {
                   authorityFu(obj.id, obj.label, () =>
@@ -111,7 +111,7 @@ function GItab5({ goodId }: Props) {
         classKey='GItab5'
         yHeight={560}
         list={tableList}
-        columnsTemp={GI5tableC}
+        columnsTemp={GI5tableC()}
         lastBtn={tableLastBtn}
         staBtn={staBtn}
         pagingInfo={false}

+ 26 - 0
src/store/action/Abench/A2bench.ts

@@ -0,0 +1,26 @@
+import http from '@/utils/http'
+
+/**
+ * 业务中心-编辑用户信息
+ */
+export const A2_APIeditUser = (data: any) => {
+  return http.post('sys/user/editInfo', data)
+}
+
+/**
+ * 业务中心-修改常用功能
+ */
+export const A2_APIsetStock = (id: number, permRtf: string) => {
+  const data = {
+    userId: id,
+    permRtf
+  }
+  return http.post('cms/workBench/permSave', data)
+}
+
+/**
+ * 业务中心-获取分页列表
+ */
+export const A2_APIgetList = (data: any) => {
+  return http.post('cms/workBench/orderPage', data)
+}

+ 16 - 3
src/store/reducer/layout.ts

@@ -1,4 +1,5 @@
-import { LookDomType, RouterTypeRow } from '@/pages/Layout/data'
+import { UserTableListType } from '@/pages/Isystem/I7user/data'
+import { LookDomType, RouterType } from '@/pages/Layout/data'
 import { MessageType } from '@/utils/message'
 
 // 初始化状态
@@ -29,7 +30,11 @@ const initState = {
   authorityIds: [] as number[],
 
   // 用户工作台常用功能
-  userRolePermissions: [] as RouterTypeRow[]
+  userRolePermissions: [] as RouterType,
+  // 用户信息
+  userInfo: {} as UserTableListType,
+  // 修改密码
+  passEditShow: false
 }
 
 // 定义 action 类型
@@ -38,7 +43,9 @@ type LayoutActionType =
   | { type: 'layout/lookDom'; payload: LookDomType }
   | { type: 'layout/message'; payload: MessageType }
   | { type: 'layout/authorityIds'; payload: number[] }
-  | { type: 'layout/userRolePermissions'; payload: RouterTypeRow[] }
+  | { type: 'layout/userRolePermissions'; payload: RouterType }
+  | { type: 'layout/userInfo'; payload: UserTableListType }
+  | { type: 'layout/passEditShow'; payload: boolean }
   | {
       type: 'layout/closeUpFile'
       payload: {
@@ -68,6 +75,12 @@ export default function layoutReducer(state = initState, action: LayoutActionTyp
     // 用户工作台常用功能
     case 'layout/userRolePermissions':
       return { ...state, userRolePermissions: action.payload }
+    // 设置用户信息
+    case 'layout/userInfo':
+      return { ...state, userInfo: action.payload }
+    // 修改密码
+    case 'layout/passEditShow':
+      return { ...state, passEditShow: action.payload }
 
     default:
       return state

+ 5 - 0
src/utils/http.ts

@@ -12,6 +12,11 @@ const baseUrlTemp = 'http://192.168.20.61:8112' // 线下环境
 
 const baseFlag = baseUrlTemp.includes('https://')
 
+// 工作台图标/其他静态图 前缀地址
+export const iconUrl = envFlag
+  ? `https://sit-qingdaobeer.4dage.com/backstage/tabImg`
+  : '/backstage/tabImg'
+
 // 请求基地址
 export const baseURL = envFlag ? `${baseUrlTemp}${baseFlag ? '' : '/api'}` : ''
 

+ 19 - 22
src/utils/storage.ts

@@ -1,7 +1,4 @@
 // ------------------------------------token的本地存储------------------------------------
-
-import { RouterTypeRow } from '@/pages/Layout/data'
-
 // 用户 Token 的本地缓存键名,自己定义
 const TOKEN_KEY = 'QING_DAO_PI_JIU_GOODS_HOUTAI_USETINFO'
 
@@ -41,29 +38,29 @@ export const getTokenFu = (): string => {
   return getTokenInfo().token
 }
 
-// --------------------业务中心-常用功能存储
-const CHANG_KEY = 'QING_DAO_PI_JIU_GOODS_HT_CHANG_ARR'
+// // --------------------业务中心-常用功能存储
+// const CHANG_KEY = 'QING_DAO_PI_JIU_GOODS_HT_CHANG_ARR'
 
-// 存
-export const changSetFu = (info: RouterTypeRow): void => {
-  const oldArr = changGetFu()
+// // 存
+// export const changSetFu = (info: RouterTypeRow): void => {
+//   const oldArr = changGetFu()
 
-  let newArr: RouterTypeRow[] = []
+//   let newArr: RouterTypeRow[] = []
 
-  // 已经存在了
-  const oldIds = oldArr.map(v => v.id)
-  if (oldIds.includes(info.id)) newArr = oldArr
-  else {
-    if (oldArr.length <= 2) newArr = [...oldArr, info]
-    else newArr = [...oldArr.slice(-2), info]
-  }
+//   // 已经存在了
+//   const oldIds = oldArr.map(v => v.id)
+//   if (oldIds.includes(info.id)) newArr = oldArr
+//   else {
+//     if (oldArr.length <= 2) newArr = [...oldArr, info]
+//     else newArr = [...oldArr.slice(-2), info]
+//   }
 
-  localStorage.setItem(CHANG_KEY, JSON.stringify(newArr))
-}
-// 取
-export const changGetFu = (): RouterTypeRow[] => {
-  return JSON.parse(localStorage.getItem(CHANG_KEY) || '[]')
-}
+//   localStorage.setItem(CHANG_KEY, JSON.stringify(newArr))
+// }
+// // 取
+// export const changGetFu = (): RouterTypeRow[] => {
+//   return JSON.parse(localStorage.getItem(CHANG_KEY) || '[]')
+// }
 
 // ------------------藏品详情id,回跳需要
 const GOODPAGE_KEY = 'QING_DAO_PI_JIU_GOODPAGE_KEY'

+ 13 - 9
src/utils/tableData.ts

@@ -191,15 +191,19 @@ export const GI4tableC = [
   ['txt', '编辑人', 'creatorName']
 ]
 
-// 藏品详情----藏品日志
-export const GI5tableC = [
-  ['dateRes', '业务发生日期', 'date'],
-  ['txt', '申请编号', 'num'],
-  ['txt', '发起部门', 'deptName'],
-  ['txt', '发起人', 'creatorName'],
-  ['txt', '发起日期', 'date'],
-  ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
-]
+// 藏品详情----藏品日志 / 工作台
+export const GI5tableC = (flag?: boolean) => {
+  let arr = [
+    ['dateRes', '业务发生日期', 'date'],
+    ['txt', '申请编号', 'num'],
+    ['txt', '发起部门', 'deptName'],
+    ['txt', '发起人', 'creatorName'],
+    ['txt', '发起日期', 'date'],
+    ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
+  ]
+  if (flag) arr.shift()
+  return arr
+}
 
 // 藏品盘点
 export const checkTableC = [