李志伟 3 年之前
父節點
當前提交
6ec6be6eaf
共有 2 個檔案被更改,包括 9 行新增3 行删除
  1. 1
    1
      src/pages/ContentManagementSystem/InformationList/edit.jsx
  2. 8
    2
      src/pages/Machinery/Machinery/edit.jsx

+ 1
- 1
src/pages/ContentManagementSystem/InformationList/edit.jsx 查看文件

@@ -98,7 +98,7 @@ export default (props) => {
98 98
             </FormItem>
99 99
             {id && (
100 100
               <FormItem label="详细信息" colon={false}>
101
-                <ExtendContent targetType="info" targetId={id} onCancel={() => history.goBack()} />
101
+                <ExtendContent targetType="news" targetId={id} onCancel={() => history.goBack()} />
102 102
               </FormItem>
103 103
             )}
104 104
             <FormItem label=" " colon={false}>

+ 8
- 2
src/pages/Machinery/Machinery/edit.jsx 查看文件

@@ -2,6 +2,7 @@ import { useState, useEffect } from 'react';
2 2
 import { Form, Input, Card, DatePicker, Select, InputNumber, message, Button } from 'antd';
3 3
 import { history } from 'umi';
4 4
 import ProCard from '@ant-design/pro-card';
5
+import ExtendContent from '@/components/ExtendContent';
5 6
 import { UploadImage, UploadImageList } from '@/components/Upload';
6 7
 import { addMachinery, updateMachinery, getMachineryDetail } from '@/services/machinery';
7 8
 import { getMachineryTypeList } from '@/services/machineryType';
@@ -121,7 +122,7 @@ export default (props) => {
121 122
             <FormItem label="主图" name="thumb" rules={[{ required: true, message: '请选择主图' }]}>
122 123
               <UploadImage />
123 124
             </FormItem>
124
-            <FormItem label="农机图集" name="images">
125
+            <FormItem label="农机banner图集" name="images">
125 126
               <UploadImageList
126 127
                 value={imageList}
127 128
                 onChange={setImageList}
@@ -181,8 +182,13 @@ export default (props) => {
181 182
                 <Option value={0}>未发布</Option>
182 183
               </Select>
183 184
             </FormItem>
185
+            {id && (
186
+              <FormItem label="详细信息" colon={false}>
187
+                <ExtendContent targetType="machinery" targetId={id} onCancel={goBack} />
188
+              </FormItem>
189
+            )}
184 190
             <FormItem label=" " colon={false}>
185
-              <Button type="default" onClick={() => goBack()}>
191
+              <Button type="default" onClick={goBack}>
186 192
                 返回
187 193
               </Button>
188 194
               <Button