Commit 76ee774c3b6c975dbfad58bdfbc058d407c34b0d

Authored by chenxt
1 parent 1316ca0c

客户档案查看图片

src/components/Common/CommonTable/index.js
@@ -1229,7 +1229,7 @@ class CommonTableRc extends React.Component { @@ -1229,7 +1229,7 @@ class CommonTableRc extends React.Component {
1229 } 1229 }
1230 1230
1231 if (commonUtils.isNotEmptyArr(sMakeUpPath)) { 1231 if (commonUtils.isNotEmptyArr(sMakeUpPath)) {
1232 - sMakeUpPath.forEach(item => { 1232 + sMakeUpPath.forEach((item , index) => {
1233 item.render = (value = '', record) => { 1233 item.render = (value = '', record) => {
1234 const { formId, name, enabled, config } = this.props; 1234 const { formId, name, enabled, config } = this.props;
1235 const { token } = this.props.app; 1235 const { token } = this.props.app;
@@ -1295,7 +1295,7 @@ class CommonTableRc extends React.Component { @@ -1295,7 +1295,7 @@ class CommonTableRc extends React.Component {
1295 if (officeFileTypeList.includes(officeFileType)) { 1295 if (officeFileTypeList.includes(officeFileType)) {
1296 imgBox = fileIcon; 1296 imgBox = fileIcon;
1297 } else if (imgTypeList.includes(officeFileType)) { 1297 } else if (imgTypeList.includes(officeFileType)) {
1298 - imgBox = <span style={{ cursor: 'pointer' }}> <img src={dataUrl} alt="img" onFocus={() => 0} onClick={e => this.handlePreviewImage(e, picAddr)} style={{ width: '30px', height: '20px' }} /></span>; 1298 + imgBox = <span style={{ cursor: 'pointer' }}> <img src={dataUrl} alt="img" onFocus={() => 0} onClick={e => this.handlePreviewImage(e, picAddr, index)} style={{ width: '30px', height: '20px' }} /></span>;
1299 } 1299 }
1300 1300
1301 return imgBox; 1301 return imgBox;
@@ -4223,7 +4223,7 @@ class CommonTableRc extends React.Component { @@ -4223,7 +4223,7 @@ class CommonTableRc extends React.Component {
4223 } 4223 }
4224 4224
4225 /* 点击图片预览 */ 4225 /* 点击图片预览 */
4226 - handlePreviewImage = (e, dataUrlArr) => { 4226 + handlePreviewImage = (e, dataUrlArr, index) => {
4227 e.stopPropagation(); /* 阻止父级穿透 */ 4227 e.stopPropagation(); /* 阻止父级穿透 */
4228 if (commonUtils.isNotEmptyObject(dataUrlArr)) { 4228 if (commonUtils.isNotEmptyObject(dataUrlArr)) {
4229 const { token } = this.props.app; 4229 const { token } = this.props.app;
@@ -4236,7 +4236,7 @@ class CommonTableRc extends React.Component { @@ -4236,7 +4236,7 @@ class CommonTableRc extends React.Component {
4236 previewImage: previewImageArr, 4236 previewImage: previewImageArr,
4237 previewVisible: true, 4237 previewVisible: true,
4238 showimgs: true, 4238 showimgs: true,
4239 - firstIndex: 0, 4239 + firstIndex: index,
4240 }); 4240 });
4241 } 4241 }
4242 }; 4242 };
@@ -5400,7 +5400,7 @@ class CommonTableRc extends React.Component { @@ -5400,7 +5400,7 @@ class CommonTableRc extends React.Component {
5400 }) 5400 })
5401 }}>{fileIcon}</span> 5401 }}>{fileIcon}</span>
5402 } else if (imgTypeList.includes(officeFileType)) { 5402 } else if (imgTypeList.includes(officeFileType)) {
5403 - imgBox = <span style={{ cursor: 'pointer' }}> <img src={dataUrl} alt="img" onFocus={() => 0} onClick={e => this.handlePreviewImage(e, picAddr)} style={{ width: '30px', height: '20px' }} /></span>; 5403 + imgBox = <span style={{ cursor: 'pointer' }}> <img src={dataUrl} alt="img" onFocus={() => 0} onClick={e => this.handlePreviewImage(e, picAddr, index)} style={{ width: '30px', height: '20px' }} /></span>;
5404 } else { 5404 } else {
5405 imgBox = <span><FileOutlined /></span> 5405 imgBox = <span><FileOutlined /></span>
5406 } 5406 }
src/utils/config.js
@@ -15,7 +15,7 @@ export const webSite = { @@ -15,7 +15,7 @@ export const webSite = {
15 // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/', 15 // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/',
16 // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//8.130.144.93:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/', 16 // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//8.130.144.93:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/',
17 interfaceAddress: localStorage.apiAddress ? localStorage.apiAddress : isDev ? '//km5cjx.gnway.cc:36867/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 17 interfaceAddress: localStorage.apiAddress ? localStorage.apiAddress : isDev ? '//km5cjx.gnway.cc:36867/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址
18 - fileAddress: isDev ? '//192.168.2.19:8080/xlyEntry/' : '//' + location.host + '/xlyEntry/', // 接口地址 18 + fileAddress: isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/', // 接口地址
19 fileAddressEbc: isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/', 19 fileAddressEbc: isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/',
20 }; 20 };
21 21