shenwu 5 bulan lalu
induk
melakukan
824876ee97

+ 7 - 7
src/pages/book/bookManage/longbookList/index.tsx

@@ -44,8 +44,9 @@ type DataItem = {
 const Page: React.FC = () => {
   let { state, getLabelAndClassList } = useModel('global');
   let [open, setOpen] = useState<any>(null); //付费配置
-  let [editValues, setEditValues] = useState<any>({});
+  let [editValues, setEditValues] = useState<any>(null);
   let [workDirection, setWorkDirection] = useState<any>(null);
+  let [paragraphEdit,setParagraphEdit]=useState<any>({});
   const [openBook, setOpneBook] = useState<any>(null); //阅读小说
   const [editSelectedRow, setEditSelectedRow] = useState<any[]>([]); //小说列表选择
 
@@ -119,16 +120,14 @@ const Page: React.FC = () => {
   // 关闭表单弹窗和重置表单内容
   const closeForm = (b: boolean, values?: any) => {
     if (!b) {
-      setEditValues({});
+      setEditValues(null);
       formRef?.current?.resetFields?.();
-      setOpen(b);
     } else {
       setEditValues(values);
       setWorkDirection(values.workDirection);
       setTimeout(() => {
         formRef?.current?.setFieldsValue(values);
       }, 100);
-      setOpen(b);
     }
   };
   return (
@@ -146,7 +145,7 @@ const Page: React.FC = () => {
             <Button
               type="primary"
               onClick={() => {
-                setOpen(true);
+                closeForm(true,{});
               }}
             >
               <PlusCircleOutlined />
@@ -274,6 +273,7 @@ const Page: React.FC = () => {
           setWorkDirection,
           del,
           setEditValues,
+          setParagraphEdit
         })}
       />
       {/* 新增编辑小说 */}
@@ -281,7 +281,7 @@ const Page: React.FC = () => {
         layout="horizontal"
         title={!editValues?.id ? '新增书籍' : '编辑书籍'}
         formRef={formRef}
-        open={open}
+        open={!!editValues}
         onOpenChange={(b) => {
           !b && closeForm(b);
         }}
@@ -331,7 +331,7 @@ const Page: React.FC = () => {
         <ReadBook listData={openBook} next={lookBook} />
       </Drawer>
       {/* 段落管理 */}
-      <Item data={editValues} onClose={setEditValues} />
+      <Item data={paragraphEdit} onClose={setParagraphEdit} />
     </PageContainer>
   );
 };

+ 3 - 1
src/pages/book/bookManage/longbookList/tableConfig.tsx

@@ -37,6 +37,7 @@ export const columns = (props: {
   setEditValues: (v: any) => void;
   setWorkDirection: (w: any) => void;
   del: (id: any) => void;
+  setParagraphEdit: (data: any) => void;
 }): ProColumns<any>[] => {
   let {
     authList,
@@ -48,6 +49,7 @@ export const columns = (props: {
     setWorkDirection,
     del,
     setEditValues,
+    setParagraphEdit
   } = props;
   let { styles } = useStyles();
   return enumList?.BOOK_STATUS
@@ -206,7 +208,7 @@ export const columns = (props: {
                   size="small"
                   className={styles.color}
                   onClick={() => {
-                    setEditValues(b);
+                    setParagraphEdit(b);
                   }}
                 >
                   章节管理

+ 10 - 7
src/pages/book/bookManage/shortbookList/index.tsx

@@ -43,7 +43,8 @@ type DataItem = {
 const Page: React.FC = () => {
   let { state, getLabelAndClassList } = useModel('global');
   let [open, setOpen] = useState<any>(null); //付费配置
-  let [editValues, setEditValues] = useState<any>({});
+  let [editValues, setEditValues] = useState<any>(null);
+  let [paragraphEdit,setParagraphEdit]=useState<any>({});
   let [workDirection, setWorkDirection] = useState<any>(null);
   const [openBook, setOpneBook] = useState<any>(null); //阅读小说
   const [editSelectedRow, setEditSelectedRow] = useState<any[]>([]); //小说列表选择
@@ -110,16 +111,16 @@ const Page: React.FC = () => {
   // 关闭表单弹窗和重置表单内容
   const closeForm = (b: boolean, values?: any) => {
     if (!b) {
-      setEditValues({});
+      setEditValues(null);
       formRef?.current?.resetFields?.();
-      setOpen(b);
+      // setOpen(b);
     } else {
       setEditValues(values);
       setWorkDirection(values.workDirection);
       setTimeout(() => {
         formRef?.current?.setFieldsValue(values);
       }, 100);
-      setOpen(b);
+      // setOpen(b);
     }
   };
   return (
@@ -137,7 +138,7 @@ const Page: React.FC = () => {
             <Button
               type="primary"
               onClick={() => {
-                setOpen(true);
+                closeForm(true,{});
               }}
             >
               <PlusCircleOutlined />
@@ -265,6 +266,7 @@ const Page: React.FC = () => {
           setWorkDirection,
           del,
           setEditValues,
+          setParagraphEdit
         })}
       />
       {/* 新增编辑小说 */}
@@ -272,7 +274,7 @@ const Page: React.FC = () => {
         layout="horizontal"
         title={!editValues?.id ? '新增书籍' : '编辑书籍'}
         formRef={formRef}
-        open={open}
+        open={!!editValues}
         onOpenChange={(b) => {
           !b && closeForm(b);
         }}
@@ -311,6 +313,7 @@ const Page: React.FC = () => {
         onClose={() => {
           setOpneBook(null);
         }}
+      
         footer={null}
         width={'65%'}
         destroyOnClose={true}
@@ -322,7 +325,7 @@ const Page: React.FC = () => {
         <ReadText data={openBook} next={lookBook} />
       </Drawer>
       {/* 段落管理 */}
-      <Item data={editValues} onClose={setEditValues} />
+      <Item data={paragraphEdit} onClose={setParagraphEdit} />
     </PageContainer>
   );
 };

+ 322 - 320
src/pages/book/bookManage/shortbookList/tableConfig.tsx

@@ -37,6 +37,7 @@ export const columns = (props: {
   setEditValues: (v: any) => void;
   setWorkDirection: (w: any) => void;
   del: (id: any) => void;
+  setParagraphEdit: (data: any) => void;
 }): ProColumns<any>[] => {
   let {
     authList,
@@ -48,6 +49,7 @@ export const columns = (props: {
     setWorkDirection,
     del,
     setEditValues,
+    setParagraphEdit
   } = props;
   let { styles } = useStyles();
   console.log(
@@ -55,343 +57,343 @@ export const columns = (props: {
   )
   return enumList?.BOOK_STATUS
     ? [
-        {
-          title: '封面',
-          dataIndex: 'picUrl',
-          key: 'picUrl',
-          width: 90,
-          ellipsis: true,
-          align: 'center',
-          hideInSearch: true,
-          render: (a: any, b: any) => {
-            return (
-              <div style={{ position: 'relative' }}>
-                <Image
-                  src={b?.picUrl}
-                  style={{ width: 50 }}
-                  onError={(e: any) => {
-                    e.target.src = localStorage.getItem('nocover');
-                  }}
-                />
-              </div>
-            );
-          },
+      {
+        title: '封面',
+        dataIndex: 'picUrl',
+        key: 'picUrl',
+        width: 90,
+        ellipsis: true,
+        align: 'center',
+        hideInSearch: true,
+        render: (a: any, b: any) => {
+          return (
+            <div style={{ position: 'relative' }}>
+              <Image
+                src={b?.picUrl}
+                style={{ width: 50 }}
+                onError={(e: any) => {
+                  e.target.src = localStorage.getItem('nocover');
+                }}
+              />
+            </div>
+          );
         },
-        {
-          title: '作品详情',
-          dataIndex: 'authorId',
-          key: 'authorId',
-          ellipsis: true,
-          hideInSearch: true,
-          width: 500,
-          render: (a, b) => {
-            let { bookName, wordCount, labels, bookStatus, categoryName, authorName, score } = b;
-            let arr = enumList?.BOOK_STATUS?.values;
-            return (
-              <Row>
-                <Col span={24}>
-                  <Space size={[5, 0]} wrap>
-                    <a
-                      style={{ fontSize: 14, color: '#337ab7', cursor: 'pointer' }}
-                      onClick={() => {
-                        lookBook?.({ ...b, pageNum: 1, pageSize: 2 });
-                      }}
-                    >
-                      [{categoryName}]{bookName}
-                    </a>
-                    <span style={{ fontSize: 11 }} className={styles.bookLabel}>
-                      [{arr[bookStatus]?.description}]
-                    </span>
-                    <Space size={[0, 0]}>
-                      {labels?.map((tags: { id: string; name: string }, index: number) => {
-                        return (
-                          <Tag key={tags?.id} color={brightColors[index]}>
-                            {tags?.name}
-                          </Tag>
-                        );
-                      })}
-                    </Space>
-                  </Space>
-                </Col>
-                <Col span={24} className={styles.bookLabel}>
-                  <span>
-                    <span>作者</span>:
+      },
+      {
+        title: '作品详情',
+        dataIndex: 'authorId',
+        key: 'authorId',
+        ellipsis: true,
+        hideInSearch: true,
+        width: 500,
+        render: (a, b) => {
+          let { bookName, wordCount, labels, bookStatus, categoryName, authorName, score } = b;
+          let arr = enumList?.BOOK_STATUS?.values;
+          return (
+            <Row>
+              <Col span={24}>
+                <Space size={[5, 0]} wrap>
+                  <a
+                    style={{ fontSize: 14, color: '#337ab7', cursor: 'pointer' }}
+                    onClick={() => {
+                      lookBook?.({ ...b, pageNum: 1, pageSize: 2 });
+                    }}
+                  >
+                    [{categoryName}]{bookName}
+                  </a>
+                  <span style={{ fontSize: 11 }} className={styles.bookLabel}>
+                    [{arr[bookStatus]?.description}]
                   </span>
-                  {authorName}
-                </Col>
-                <Col span={24} className={styles.bookLabel}>
-                  <span>总字数:</span>
-                  {wordCount || 0}
-                </Col>
-                <Col span={24} className={styles.bookLabel}>
-                  <span>评分:</span>
-                  {score || 0}
-                </Col>
-              </Row>
-            );
-          },
+                  <Space size={[0, 0]}>
+                    {labels?.map((tags: { id: string; name: string }, index: number) => {
+                      return (
+                        <Tag key={tags?.id} color={brightColors[index]}>
+                          {tags?.name}
+                        </Tag>
+                      );
+                    })}
+                  </Space>
+                </Space>
+              </Col>
+              <Col span={24} className={styles.bookLabel}>
+                <span>
+                  <span>作者</span>:
+                </span>
+                {authorName}
+              </Col>
+              <Col span={24} className={styles.bookLabel}>
+                <span>总字数:</span>
+                {wordCount || 0}
+              </Col>
+              <Col span={24} className={styles.bookLabel}>
+                <span>评分:</span>
+                {score || 0}
+              </Col>
+            </Row>
+          );
         },
-        {
-          title: '所属频道',
-          dataIndex: 'workDirection',
-          key: 'workDirection',
-          align: 'center',
-          width: 80,
-          ellipsis: true,
-          hideInSearch: true,
-          render: (a: any, b: any) => {
-            return enumList?.WORK_DIRECTION?.values[b.workDirection]?.description;
-          },
+      },
+      {
+        title: '所属频道',
+        dataIndex: 'workDirection',
+        key: 'workDirection',
+        align: 'center',
+        width: 80,
+        ellipsis: true,
+        hideInSearch: true,
+        render: (a: any, b: any) => {
+          return enumList?.WORK_DIRECTION?.values[b.workDirection]?.description;
         },
-        {
-          title: '点击量',
-          dataIndex: 'visitCount',
-          key: 'visitCount',
-          width: 90,
-          ellipsis: true,
-          align: 'center',
-          hideInSearch: true,
-          render: (a, b) => {
-            let { visitCount } = b;
-            return visitCount;
-          },
+      },
+      {
+        title: '点击量',
+        dataIndex: 'visitCount',
+        key: 'visitCount',
+        width: 90,
+        ellipsis: true,
+        align: 'center',
+        hideInSearch: true,
+        render: (a, b) => {
+          let { visitCount } = b;
+          return visitCount;
         },
-        {
-          title: '上架状态',
-          dataIndex: 'shelveStatus',
-          key: 'shelveStatus',
-          width: 90,
-          ellipsis: true,
-          align: 'center',
-          hideInSearch: true,
-          render: (a: any, b) => {
-            let arr: any = enumList?.SHELVE_STATUS?.values;
-            let { shelveStatus } = b;
-            return (
-              arr[shelveStatus]?.description && (
-                <Badge
-                  text={arr[shelveStatus]?.description}
-                  status={shelveStatus == 0 ? 'processing' : 'default'}
-                />
-              )
-            );
-          },
+      },
+      {
+        title: '上架状态',
+        dataIndex: 'shelveStatus',
+        key: 'shelveStatus',
+        width: 90,
+        ellipsis: true,
+        align: 'center',
+        hideInSearch: true,
+        render: (a: any, b) => {
+          let arr: any = enumList?.SHELVE_STATUS?.values;
+          let { shelveStatus } = b;
+          return (
+            arr[shelveStatus]?.description && (
+              <Badge
+                text={arr[shelveStatus]?.description}
+                status={shelveStatus == 0 ? 'processing' : 'default'}
+              />
+            )
+          );
         },
-        {
-          title: '来源',
-          dataIndex: 'source',
-          key: 'source',
-          width: 90,
-          ellipsis: true,
-          align: 'center',
-          hideInSearch: true,
-          render: (a: any, b) => {
-            let { source } = b;
-            let arr: any = new Map(
-              enumList?.SOURCE?.values?.map(({ value, description }: any) => [value, description]),
-            );
-            return arr.get(source);
-          },
+      },
+      {
+        title: '来源',
+        dataIndex: 'source',
+        key: 'source',
+        width: 90,
+        ellipsis: true,
+        align: 'center',
+        hideInSearch: true,
+        render: (a: any, b) => {
+          let { source } = b;
+          let arr: any = new Map(
+            enumList?.SOURCE?.values?.map(({ value, description }: any) => [value, description]),
+          );
+          return arr.get(source);
         },
-        {
-          title: '操作',
-          dataIndex: 'cz',
-          key: 'cz',
-          width: 90,
-          ellipsis: true,
-          align: 'center',
-          hideInSearch: true,
-          render: (a: any, b: any) => {
-            return (
-              <Space size={[0, 0]}>
-                <Button
-                  type="link"
-                  size="small"
-                  className={styles.color}
-                  onClick={() => {
-                    setEditValues(b);
-                  }}
-                >
-                  段落管理
-                </Button>
-                <Button
-                  type="link"
-                  size="small"
-                  onClick={() => {
-                    closeForm(true, b);
-                  }}
-                >
-                  编辑
+      },
+      {
+        title: '操作',
+        dataIndex: 'cz',
+        key: 'cz',
+        width: 90,
+        ellipsis: true,
+        align: 'center',
+        hideInSearch: true,
+        render: (a: any, b: any) => {
+          return (
+            <Space size={[0, 0]}>
+              <Button
+                type="link"
+                size="small"
+                className={styles.color}
+                onClick={() => {
+                  setParagraphEdit(b);
+                }}
+              >
+                段落管理
+              </Button>
+              <Button
+                type="link"
+                size="small"
+                onClick={() => {
+                  closeForm(true, b)
+                }}
+              >
+                编辑
+              </Button>
+              <Popconfirm
+                title={
+                  <div>
+                    确定要删除<span style={{ color: 'red' }}>{b.bookName}</span>此书籍?
+                  </div>
+                }
+                onConfirm={() => {
+                  del(b.id);
+                }}
+              >
+                <Button type="link" size="small" danger>
+                  删除
                 </Button>
-                <Popconfirm
-                  title={
-                    <div>
-                      确定要删除<span style={{ color: 'red' }}>{b.bookName}</span>此书籍?
-                    </div>
-                  }
-                  onConfirm={() => {
-                    del(b.id);
-                  }}
-                >
-                  <Button type="link" size="small" danger>
-                    删除
-                  </Button>
-                </Popconfirm>
-              </Space>
-            );
-          },
-        },
-        // 搜索条件
-        {
-          title: '小说名称',
-          dataIndex: 'bookName',
-          valueType: 'text',
-          hideInTable: true,
-          fieldProps: { placeholder: '请输入小说名称' },
-          colSize: 1,
-        },
-        {
-          title: '作者',
-          dataIndex: 'authorId',
-          valueType: 'select',
-          hideInTable: true,
-          fieldProps: { showSearch: true, placeholder: '请选择作者' },
-          colSize: 1,
-          valueEnum: new Map(authList?.map(({ id, authorName }) => [id, authorName])),
+              </Popconfirm>
+            </Space>
+          );
         },
-        {
-          title: '频道',
-          dataIndex: 'workDirection',
-          valueType: 'segmented',
-          hideInTable: true,
-          fieldProps: {
-            type: 'primary',
-            style: { width: 'auto' },
-            onChange: (value) => {
-              setWorkDirection(value);
-            },
-          },
-          colSize: 3,
-          initialValue: '',
-          valueEnum: () => {
-            let arr = enumList?.WORK_DIRECTION?.values;
-            return arr
-              ? new Map(
-                  [{ value: '', description: '全部' }, ...arr]?.map(
-                    ({ value, description }: any) => [value, description],
-                  ),
-                )
-              : {};
+      },
+      // 搜索条件
+      {
+        title: '小说名称',
+        dataIndex: 'bookName',
+        valueType: 'text',
+        hideInTable: true,
+        fieldProps: { placeholder: '请输入小说名称' },
+        colSize: 1,
+      },
+      {
+        title: '作者',
+        dataIndex: 'authorId',
+        valueType: 'select',
+        hideInTable: true,
+        fieldProps: { showSearch: true, placeholder: '请选择作者' },
+        colSize: 1,
+        valueEnum: new Map(authList?.map(({ id, authorName }) => [id, authorName])),
+      },
+      {
+        title: '频道',
+        dataIndex: 'workDirection',
+        valueType: 'segmented',
+        hideInTable: true,
+        fieldProps: {
+          type: 'primary',
+          style: { width: 'auto' },
+          onChange: (value) => {
+            setWorkDirection(value);
           },
         },
-        {
-          title: '分类',
-          dataIndex: 'categoryId',
-          valueType: 'segmented',
-          hideInTable: true,
-          hideInSearch: !labelList,
-          fieldProps: { type: 'primary', style: { width: 'auto' } },
-          colSize: 3,
-          initialValue: '',
-          valueEnum: () => {
-            let arr = categoryList || [];
-            return new Map([{ id: '', name: '全部' }, ...arr]?.map((item) => [item.id, item.name]));
-          },
+        colSize: 3,
+        initialValue: '',
+        valueEnum: () => {
+          let arr = enumList?.WORK_DIRECTION?.values;
+          return arr
+            ? new Map(
+              [{ value: '', description: '全部' }, ...arr]?.map(
+                ({ value, description }: any) => [value, description],
+              ),
+            )
+            : {};
         },
-        {
-          title: '标签',
-          dataIndex: 'labelIds',
-          valueType: 'segmented',
-          hideInTable: true,
-          hideInSearch: !labelList,
-          fieldProps: { type: 'primary', style: { width: 'auto' } },
-          colSize: 3,
-          initialValue: '',
-          valueEnum: () => {
-            let arr = labelList || [];
-            return new Map([{ id: '', name: '全部' }, ...arr]?.map((item) => [item.id, item.name]));
-          },
+      },
+      {
+        title: '分类',
+        dataIndex: 'categoryId',
+        valueType: 'segmented',
+        hideInTable: true,
+        hideInSearch: !labelList,
+        fieldProps: { type: 'primary', style: { width: 'auto' } },
+        colSize: 3,
+        initialValue: '',
+        valueEnum: () => {
+          let arr = categoryList || [];
+          return new Map([{ id: '', name: '全部' }, ...arr]?.map((item) => [item.id, item.name]));
         },
-        {
-          title: '来源',
-          dataIndex: 'source',
-          valueType: 'segmented',
-          hideInTable: true,
-          fieldProps: { type: 'primary', style: { width: 'auto' } },
-          colSize: 3,
-          initialValue: '',
-          valueEnum: () => {
-            let arr = enumList?.SOURCE?.values;
-            return arr
-              ? new Map(
-                  [{ value: '', description: '全部' }, ...arr]?.map(
-                    ({ value, description }: any) => [value, description],
-                  ),
-                )
-              : {};
-          },
+      },
+      {
+        title: '标签',
+        dataIndex: 'labelIds',
+        valueType: 'segmented',
+        hideInTable: true,
+        hideInSearch: !labelList,
+        fieldProps: { type: 'primary', style: { width: 'auto' } },
+        colSize: 3,
+        initialValue: '',
+        valueEnum: () => {
+          let arr = labelList || [];
+          return new Map([{ id: '', name: '全部' }, ...arr]?.map((item) => [item.id, item.name]));
         },
-        {
-          title: '连载',
-          dataIndex: 'bookStatus',
-          valueType: 'segmented',
-          hideInTable: true,
-          fieldProps: { type: 'primary', style: { width: 'auto' } },
-          colSize: 3,
-          initialValue: '',
-          valueEnum: () => {
-            let arr = enumList?.BOOK_STATUS?.values;
-            return arr
-              ? new Map(
-                  [{ value: '', description: '全部' }, ...arr]?.map(
-                    ({ value, description }: any) => [value, description],
-                  ),
-                )
-              : {};
-          },
+      },
+      {
+        title: '来源',
+        dataIndex: 'source',
+        valueType: 'segmented',
+        hideInTable: true,
+        fieldProps: { type: 'primary', style: { width: 'auto' } },
+        colSize: 3,
+        initialValue: '',
+        valueEnum: () => {
+          let arr = enumList?.SOURCE?.values;
+          return arr
+            ? new Map(
+              [{ value: '', description: '全部' }, ...arr]?.map(
+                ({ value, description }: any) => [value, description],
+              ),
+            )
+            : {};
         },
-        {
-          title: '上架',
-          dataIndex: 'shelveStatus',
-          valueType: 'segmented',
-          hideInTable: true,
-          fieldProps: { type: 'primary', style: { width: 'auto' } },
-          colSize: 3,
-          initialValue: '',
-          valueEnum: () => {
-            let arr = enumList?.SHELVE_STATUS?.values;
-            return arr
-              ? new Map(
-                  [{ value: '', description: '全部' }, ...arr]?.map(
-                    ({ value, description }: any) => [value, description],
-                  ),
-                )
-              : {};
-          },
+      },
+      {
+        title: '连载',
+        dataIndex: 'bookStatus',
+        valueType: 'segmented',
+        hideInTable: true,
+        fieldProps: { type: 'primary', style: { width: 'auto' } },
+        colSize: 3,
+        initialValue: '',
+        valueEnum: () => {
+          let arr = enumList?.BOOK_STATUS?.values;
+          return arr
+            ? new Map(
+              [{ value: '', description: '全部' }, ...arr]?.map(
+                ({ value, description }: any) => [value, description],
+              ),
+            )
+            : {};
         },
-        {
-          title: '字数',
-          dataIndex: 'wordCount',
-          valueType: 'segmented',
-          hideInTable: true,
-          fieldProps: { type: 'primary', style: { width: 'auto' }, block: true },
-          colSize: 3,
-          initialValue: '',
-          valueEnum: {
-            '': '全部',
-            '0-2': '2万内',
-            '2-5': '2-5万',
-            '5-10': '5-10万',
-            '10-20': '10-20万',
-            '20-40': '20-40万',
-            '40-100': '40-100万',
-            '100-150': '100-150万',
-            '150-200': '150-200万',
-            '200-300': '200-300万',
-            '300-0': '300万以上',
-          },
+      },
+      {
+        title: '上架',
+        dataIndex: 'shelveStatus',
+        valueType: 'segmented',
+        hideInTable: true,
+        fieldProps: { type: 'primary', style: { width: 'auto' } },
+        colSize: 3,
+        initialValue: '',
+        valueEnum: () => {
+          let arr = enumList?.SHELVE_STATUS?.values;
+          return arr
+            ? new Map(
+              [{ value: '', description: '全部' }, ...arr]?.map(
+                ({ value, description }: any) => [value, description],
+              ),
+            )
+            : {};
+        },
+      },
+      {
+        title: '字数',
+        dataIndex: 'wordCount',
+        valueType: 'segmented',
+        hideInTable: true,
+        fieldProps: { type: 'primary', style: { width: 'auto' }, block: true },
+        colSize: 3,
+        initialValue: '',
+        valueEnum: {
+          '': '全部',
+          '0-2': '2万内',
+          '2-5': '2-5万',
+          '5-10': '5-10万',
+          '10-20': '10-20万',
+          '20-40': '20-40万',
+          '40-100': '40-100万',
+          '100-150': '100-150万',
+          '150-200': '150-200万',
+          '200-300': '200-300万',
+          '300-0': '300万以上',
         },
-      ]
+      },
+    ]
     : [];
 };
 

+ 2 - 0
src/pages/distribution/miniprogram/pagesManage/index.tsx

@@ -56,6 +56,7 @@ const Page: React.FC = () => {
   }
   // 添加页面
   const openAdd = (id: any) => {
+    console.log(id)
     tableRef?.current?.openMoadl(id)
   }
   return (
@@ -100,6 +101,7 @@ const Page: React.FC = () => {
               bordered
               // 页面组件列表
               expandable={{
+                defaultExpandedRowKeys:[1],
                 rowExpandable: (record) => record?.componentList?.length > 0,
                 expandRowByClick: true,
                 expandedRowRender: (record) => {

+ 1 - 1
src/services/book/bookTags/index.tsx

@@ -8,7 +8,7 @@ import { request } from '@umijs/max';
  */
 export async function apiBookContentLabelEdit(params: any) {
   let { id, ...data } = params;
-  return request(api + `/bookContent/bookContent/admin/bookLabel/${id}`, {
+  return request(api + `/bookContent/admin/bookLabel/${id}`, {
     method: 'PUT',
     data,
   });