shaogen1995 3 месяцев назад
Родитель
Сommit
e4a03694fa

BIN
src/assets/img/NoPower.png


+ 11 - 1
src/components/NoPower/index.module.scss

@@ -1,7 +1,17 @@
 .NoPower {
   background-color: #fff;
   border-radius: 10px;
-  padding: 24px;
+  padding-bottom: 5%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100%;
   :global {
+    p {
+      color: #666666;
+      margin-top: 24px;
+    }
   }
 }

+ 4 - 1
src/components/NoPower/index.tsx

@@ -1,9 +1,12 @@
 import React from 'react'
 import styles from './index.module.scss'
+import NoPowerImg from '@/assets/img/NoPower.png'
+
 function NoPower() {
   return (
     <div className={styles.NoPower}>
-      <h1>您没有本页面的权限,请联系管理员开通。</h1>
+      <img src={NoPowerImg} alt='' />
+      <p>您没有本页面的权限,请联系管理员开通。</p>
     </div>
   )
 }

+ 2 - 19
src/pages/B_enterTibet/B1collect/B1edit/B1MoAdd/index.tsx

@@ -23,28 +23,11 @@ function B1MoAdd({ info, closeFu, succFu, look = false }: Props) {
   const [file, setFile] = useState([])
 
   const getInfoFu = useCallback(async () => {
-    // const res = await B1X_APIgetInfo(id)
-    // if (res.code === 0) {
-    //   const obj: any = { ...res.data }
-    //   cascaderChArr.forEach(v => {
-    //     if (obj[v]) obj[v] = obj[v].split(',')
-    //   })
-    //   FormBoxRef.current?.setFieldsValue({
-    //     ...obj
-    //   })
-    //   // 设置附件
-    //   setFile(obj.file || [])
-    //   // 设置图片
-    //   imgRef.current?.setFileComFileFu({
-    //     type: 'img',
-    //     fileList: obj.img || []
-    //   })
-    // }
-
     const obj: any = { ...info }
 
     cascaderChArr.forEach(v => {
-      if (obj[v]) obj[v] = obj[v].split(',')
+      if (obj[v] === '0') obj[v] = null
+      else if (obj[v]) obj[v] = obj[v].split(',')
     })
     FormBoxRef.current?.setFieldsValue(obj)
 

+ 3 - 1
src/pages/C_goodsManage/C1register/AddGoods/index.tsx

@@ -84,12 +84,14 @@ function AddGoods({ nowSta, closeFu, succFu, isEdit, editSnap }: Props) {
         setTxtArr([obj.creatorName, dayjs(obj.createTime).format('YYYY-MM-DD')])
 
         cascaderChArr.forEach(v => {
-          if (obj[v]) obj[v] = obj[v].split(',')
+          if (obj[v] === '0') obj[v] = null
+          else if (obj[v]) obj[v] = obj[v].split(',')
         })
 
         addZiSelectChArr.forEach(v => {
           if (!obj[v]) obj[v] = null
         })
+
         FormBoxRef.current?.setFieldsValue(obj)
 
         // 设置封面图