瀏覽代碼

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into dev

xujing 5 年之前
父節點
當前提交
9c3e8bd3e9

+ 7
- 8
config/config.js 查看文件

@@ -33,11 +33,11 @@ const plugins = [
33 33
       },
34 34
       pwa: pwa
35 35
         ? {
36
-          workboxPluginMode: 'InjectManifest',
37
-          workboxOptions: {
38
-            importWorkboxFrom: 'local',
39
-          },
40
-        }
36
+            workboxPluginMode: 'InjectManifest',
37
+            workboxOptions: {
38
+              importWorkboxFrom: 'local',
39
+            },
40
+          }
41 41
         : false, // default close dll, because issue https://github.com/ant-design/ant-design-pro/issues/4665
42 42
       // dll features https://webpack.js.org/plugins/dll-plugin/
43 43
       // dll: {
@@ -83,7 +83,8 @@ export default {
83 83
   targets: {
84 84
     ie: 11,
85 85
   },
86
-  publicPath: './',
86
+  publicPath:
87
+    process.env.PROD_ENV === 1 ? 'https://njcjweb.oss-accelerate.aliyuncs.com/admin/' : './',
87 88
   // publicPath: 'https://njcjweb.oss-accelerate.aliyuncs.com/admin/',
88 89
   history: 'hash',
89 90
   devtool: isAntDesignProPreview ? 'source-map' : false,
@@ -97,8 +98,6 @@ export default {
97 98
     'btn-danger-bg': '#FF7E48',
98 99
     'radio-button-hover-color': '#FF7E48',
99 100
     'radio-button-active-color': 'red',
100
-    
101
-
102 101
   },
103 102
   define: {
104 103
     ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION:

+ 2
- 1
package.json 查看文件

@@ -5,7 +5,8 @@
5 5
   "description": "An out-of-box UI solution for enterprise applications",
6 6
   "scripts": {
7 7
     "analyze": "cross-env ANALYZE=1 umi build",
8
-    "build": "umi build",
8
+    "build:prod": "cross-env PROD_ENV=1 umi build",
9
+    "build": "cross-env PROD_ENV=2 umi build",
9 10
     "deploy": "cross-env ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION=site npm run site && npm run gh-pages",
10 11
     "fetch:blocks": "pro fetch-blocks",
11 12
     "format-imports": "import-sort --write '**/*.{js,jsx,ts,tsx}'",

+ 2
- 1
src/components/ActionList/index.jsx 查看文件

@@ -11,9 +11,10 @@ export default function withActions(actionsRender) {
11 11
 
12 12
     const menus = (
13 13
       <Menu className="actlist-menu">
14
-        {(leftActs || []).concat(Act2).filter(Boolean).map((Act, index) => (<Menu.Item key={`dm-${index}`}>{Act}</Menu.Item>))}
14
+        {[Act2].concat(leftActs).filter(Boolean).map((Act, index) => (<Menu.Item key={`dm-${index}`}>{Act}</Menu.Item>))}
15 15
       </Menu>
16 16
     );
17
+    console.log('---------->', record, menus)
17 18
 
18 19
     return (
19 20
       <div className="action-list">

+ 2
- 2
src/components/EditIcon/index.jsx 查看文件

@@ -89,8 +89,8 @@ const EditIcon = ({ text, type, color, position, onClick }) => {
89 89
     const color2 = color || icon.color || '#ff925c';
90 90
     const position2 = position || icon.pos;
91 91
 
92
-    const wrappedStyle = useMemo(() => ({ color: `${color2}`, display: 'flex', alignItems: 'center', cursor: 'pointer' }), [color]);
93
-    const iconStyle = useMemo(() => ({ display: 'inline-block', marginLeft: '6px', background: `url(${spriteImg}) 0 ${position2}px / 100% 1300% no-repeat`, width: '18px', height: '18px' }), [position])
92
+    const wrappedStyle = useMemo(() => ({ color: `${color2}`, display: 'flex', alignItems: 'center', cursor: 'pointer' }), [type, color]);
93
+    const iconStyle = useMemo(() => ({ display: 'inline-block', marginLeft: '6px', background: `url(${spriteImg}) 0 ${position2}px / 100% 1300% no-repeat`, width: '18px', height: '18px' }), [type, position])
94 94
 
95 95
     return (
96 96
         <span style={wrappedStyle} onClick={onClick || noop} >

+ 1
- 1
src/pages/activity/ActivityList.jsx 查看文件

@@ -186,7 +186,7 @@ const header = props => {
186 186
           <EditIcon type={row.weight === 1 ? 'cancel' : 'add'} text={row.weight === 1 ? '取消标签' : '添加标签'} onClick={topDynamic(row)} />
187 187
         </AuthButton>,
188 188
 
189
-        <EditIcon type={row.home === 1 ? 'cancel' : 'top'} text={row.home === 1 ? '取消推首页' : '推首页'} onClick={homeDynamic(row)} />,
189
+        <EditIcon type={row.home === 1 ? 'cancel' : 'top'} text={row.home === 1 ? '取消推首页' : '推首页'} onClick={homeDynamic(row)} />,
190 190
 
191 191
         <EditIcon type="record" text="数据记录" onClick={toDataReacord(row.dynamicId)} />,
192 192
 

+ 1
- 1
src/pages/activity/groupActivity/list.jsx 查看文件

@@ -163,7 +163,7 @@ const header = props => {
163 163
           </AuthButton>,
164 164
             
165 165
           <AuthButton name="admin.taShareActivity.top" noRight={null}>
166
-            <EditIcon type={row.sort === 1 ? 'cancel' : 'top'} text={row.sort === 1 ? '取消推荐首页' : '推荐首页'} onClick={recommendGroupActivity(row)} />
166
+            <EditIcon type={row.sort ? 'cancel' : 'top'} text={row.sort ? '取消推荐首页' : '推荐首页'} onClick={recommendGroupActivity(row)} />
167 167
           </AuthButton>,
168 168
 
169 169
           <EditIcon type="record" text="数据记录" onClick={() => toDataReacord(row.groupActivityId)} />,

+ 1
- 1
src/pages/activity/helpActivity/list.jsx 查看文件

@@ -149,7 +149,7 @@ const header = props => {
149 149
         </AuthButton>,
150 150
 
151 151
         <AuthButton name="admin.help.top" noRight={null}>
152
-          <EditIcon type={row.isMain === 1 ? 'cancel' : 'top'} text={row.isMain === 1 ? '取消推首页' : '推首页'} onClick={topDynamic(row, 1)} />
152
+          <EditIcon type={row.isMain ? 'cancel' : 'top'} text={row.isMain ? '取消推首页' : '推首页'} onClick={topDynamic(row, 1)} />
153 153
         </AuthButton>,
154 154
 
155 155
         <EditIcon type="record" text="数据记录" onClick={() => toDataReacord(row.helpActivityId)} />,

+ 10
- 11
src/pages/house/preSelect/list/index.jsx 查看文件

@@ -1,19 +1,18 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker, notification } from 'antd';
3
-import { FormattedMessage } from 'umi-plugin-react/locale';
2
+import { Form, Input, Button, Icon, Select, message, Table, Pagination, Modal, notification } from 'antd';
4 3
 import router from 'umi/router';
5 4
 import moment from 'moment';
6
-import styles from '../../../style/GoodsList.less';
7
-import SelectCity from '../../../../components/SelectButton/CitySelect'
5
+import AuthButton from '@/components/AuthButton';
6
+import Navigate from '@/components/Navigate';
7
+import withActions from '@/components/ActionList';
8
+import EditIcon from '@/components/EditIcon';
8 9
 import BuildSelect from '../../../../components/SelectButton/BuildSelect'
9 10
 import apis from '../../../../services/apis';
10 11
 import request from '../../../../utils/request';
11
-import AuthButton from '@/components/AuthButton';
12 12
 import PreSelectHelpDoc from '../edit/components/PreSelectHelpDoc';
13
-import Navigate from '@/components/Navigate';
13
+import styles from '../../../style/GoodsList.less';
14 14
 
15 15
 const { Option } = Select;
16
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
17 16
 
18 17
 const header = props => {
19 18
   // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -166,11 +165,11 @@ const header = props => {
166 165
       dataIndex: '',
167 166
       key: '',
168 167
       align: 'center',
169
-      render: (text, record) => (
168
+      render: withActions((text, record) => [
170 169
         <AuthButton name="admin.preselection.detail.get" noRight={null}>
171
-          <a style={{ color: '#66B3FF' }} onClick={toAddHouse(record)} >查看详情</a>
172
-        </AuthButton>
173
-      ),
170
+          <EditIcon type="look" text="查看详情" onClick={toAddHouse(record)} ></EditIcon>
171
+        </AuthButton>,
172
+      ]),
174 173
     },
175 174
   ];
176 175
 

+ 7
- 7
src/pages/system/document/list.jsx 查看文件

@@ -3,6 +3,8 @@ import { Table, Form, Icon, Input, Button, message  } from 'antd'
3 3
 import { router } from 'umi';
4 4
 import moment from 'moment';
5 5
 import Navigate from '@/components/Navigate';
6
+import withActions from '@/components/ActionList';
7
+import EditIcon from '@/components/EditIcon';
6 8
 import request from '../../../utils/request';
7 9
 import apis from '../../../services/apis';
8 10
 import AuthButton from '../../../components/AuthButton';
@@ -111,13 +113,11 @@ function body(props) {
111 113
       dataIndex: 'documentVerifyId',
112 114
       key: 'documentVerifyId',
113 115
       align: 'center',
114
-      render: (x,row) => (
115
-        <>
116
-          <AuthButton name="admin.documentVerify.id.get" noRight={null}>
117
-            <span style={{ color: '#1990FF',cursor: 'pointer' }} onClick={()=>audit(row)}>{ row.unverified === 0 ? '查看' : '审核' }</span>
118
-           </AuthButton>
119
-        </>
120
-      )
116
+      render: withActions((x,row) => [
117
+        <AuthButton name="admin.documentVerify.id.get" noRight={null}>
118
+          <EditIcon type={row.unverified === 0 ? 'look' : ''} text={row.unverified === 0 ? '查看' : '审核'} onClick={()=>audit(row)}></EditIcon>
119
+        </AuthButton>,
120
+      ])
121 121
     },
122 122
   ]
123 123