Commit 9557872502f2d938e99028f9db7f32dd2e79ab7d
1 parent
8cb21212
新增附件上传;
Showing
5 changed files
with
25 additions
and
6 deletions
src/components/Common/CommonComponent/index.js
| @@ -23,7 +23,7 @@ import { | @@ -23,7 +23,7 @@ import { | ||
| 23 | Tooltip, | 23 | Tooltip, |
| 24 | Modal, | 24 | Modal, |
| 25 | } from "antd-v4"; | 25 | } from "antd-v4"; |
| 26 | -import {DeleteOutlined, EyeOutlined, FilePdfOutlined, FileWordOutlined, FileExcelOutlined, FileOutlined, RightOutlined } from "@ant-design/icons"; | 26 | +import {DeleteOutlined, EyeOutlined, FilePdfOutlined, FileWordOutlined, FileExcelOutlined, FileOutlined, RightOutlined, PlaySquareOutlined } from "@ant-design/icons"; |
| 27 | import * as commonUtils from "@/utils/utils"; | 27 | import * as commonUtils from "@/utils/utils"; |
| 28 | import styles from "@/index.less"; | 28 | import styles from "@/index.less"; |
| 29 | import Provinces from "@/assets/provinces.json"; | 29 | import Provinces from "@/assets/provinces.json"; |
| @@ -3526,7 +3526,7 @@ export default class CommonComponent extends Component { | @@ -3526,7 +3526,7 @@ export default class CommonComponent extends Component { | ||
| 3526 | ? `${commonConfig.file_host}file/download?savePathStr=${picAddr[0]}&scale=0.1&sModelsId=100&token=${token}` | 3526 | ? `${commonConfig.file_host}file/download?savePathStr=${picAddr[0]}&scale=0.1&sModelsId=100&token=${token}` |
| 3527 | : picAddr[0]; /* 缩略图 */ | 3527 | : picAddr[0]; /* 缩略图 */ |
| 3528 | // const dataPriviewUrl = `${commonConfig.server_host}file/download?savePathStr=${picAddr}&width=800&&height=500&sModelsId=100&token=${token}`; /* 预览 */ | 3528 | // const dataPriviewUrl = `${commonConfig.server_host}file/download?savePathStr=${picAddr}&width=800&&height=500&sModelsId=100&token=${token}`; /* 预览 */ |
| 3529 | - const officeFileTypeList = ["PDF", "DOCX", "XLSX"]; | 3529 | + const officeFileTypeList = ['PDF', 'DOCX', 'XLSX', 'MP4', 'WEBM', 'OGG']; |
| 3530 | const imgTypeList = ["PNG", "SVG", "JPG", "JPEG", "GIF", "BMP", "TIFF", "ICO"]; | 3530 | const imgTypeList = ["PNG", "SVG", "JPG", "JPEG", "GIF", "BMP", "TIFF", "ICO"]; |
| 3531 | const officeFileType = picAddr[0].split(".").pop().toUpperCase(); | 3531 | const officeFileType = picAddr[0].split(".").pop().toUpperCase(); |
| 3532 | let fileIcon = <FilePdfOutlined />; | 3532 | let fileIcon = <FilePdfOutlined />; |
| @@ -3534,6 +3534,8 @@ export default class CommonComponent extends Component { | @@ -3534,6 +3534,8 @@ export default class CommonComponent extends Component { | ||
| 3534 | fileIcon = <FileWordOutlined />; | 3534 | fileIcon = <FileWordOutlined />; |
| 3535 | } else if (officeFileType === "XLSX") { | 3535 | } else if (officeFileType === "XLSX") { |
| 3536 | fileIcon = <FileExcelOutlined />; | 3536 | fileIcon = <FileExcelOutlined />; |
| 3537 | + } else if (['MP4', 'WEBM', 'OGG'].includes(officeFileType)) { | ||
| 3538 | + fileIcon = <PlaySquareOutlined />; | ||
| 3537 | } | 3539 | } |
| 3538 | let imgBox1 = ""; | 3540 | let imgBox1 = ""; |
| 3539 | if (officeFileTypeList.includes(officeFileType)) { | 3541 | if (officeFileTypeList.includes(officeFileType)) { |
src/components/Common/ToolBar/ToolBarNew.js
| @@ -337,7 +337,7 @@ class ToolBarComponent extends Component { | @@ -337,7 +337,7 @@ class ToolBarComponent extends Component { | ||
| 337 | const { masterConfig = {} } = this.props; | 337 | const { masterConfig = {} } = this.props; |
| 338 | const { gdsconfigformslave = [] } = masterConfig; | 338 | const { gdsconfigformslave = [] } = masterConfig; |
| 339 | const sBtnSendDialogConfigList = gdsconfigformslave.filter(item => item.sControlName && item.sControlName.includes("BtnSendDialog")); | 339 | const sBtnSendDialogConfigList = gdsconfigformslave.filter(item => item.sControlName && item.sControlName.includes("BtnSendDialog")); |
| 340 | - if (commonUtils.isNotEmptyArr(sBtnSendDialogConfigList) && !this.props.onToolBarBtnClick) { | 340 | + if (location.pathname === "/indexPage/quotationPackTableTree" || (commonUtils.isNotEmptyArr(sBtnSendDialogConfigList) && !this.props.onToolBarBtnClick)) { |
| 341 | this.btnSendDialogLoaded = true; | 341 | this.btnSendDialogLoaded = true; |
| 342 | this.props.onSaveState({ | 342 | this.props.onSaveState({ |
| 343 | onToolBarBtnClick: this.handleClick, | 343 | onToolBarBtnClick: this.handleClick, |
src/components/CommonElementEvent/FilfileManageInfo.js
| @@ -87,6 +87,7 @@ class FilfileManageInfoComponent extends Component { | @@ -87,6 +87,7 @@ class FilfileManageInfoComponent extends Component { | ||
| 87 | tableDataRow.sSrcId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcId : ''; | 87 | tableDataRow.sSrcId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcId : ''; |
| 88 | tableDataRow.sSrcSlaveId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcSlaveId : ''; | 88 | tableDataRow.sSrcSlaveId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcSlaveId : ''; |
| 89 | tableDataRow.sPicturePath = file.response && file.response.code === 1 ? sPicturePath : ''; | 89 | tableDataRow.sPicturePath = file.response && file.response.code === 1 ? sPicturePath : ''; |
| 90 | + tableDataRow.spicture = tableDataRow.sPicturePath; | ||
| 90 | tableDataRow.sFileName = file.response && file.response.code === 1 ? file.name : ''; | 91 | tableDataRow.sFileName = file.response && file.response.code === 1 ? file.name : ''; |
| 91 | tableData.push(tableDataRow); | 92 | tableData.push(tableDataRow); |
| 92 | this.props.onSaveState({ [`${name}Data`]: tableData }); | 93 | this.props.onSaveState({ [`${name}Data`]: tableData }); |
| @@ -127,9 +128,9 @@ class FilfileManageInfoComponent extends Component { | @@ -127,9 +128,9 @@ class FilfileManageInfoComponent extends Component { | ||
| 127 | tableDataRow.sSrcId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcId : ''; | 128 | tableDataRow.sSrcId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcId : ''; |
| 128 | tableDataRow.sSrcSlaveId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcSlaveId : ''; | 129 | tableDataRow.sSrcSlaveId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcSlaveId : ''; |
| 129 | tableDataRow.sPicturePath = file.response && file.response.code === 1 ? sPicturePath : ''; | 130 | tableDataRow.sPicturePath = file.response && file.response.code === 1 ? sPicturePath : ''; |
| 131 | + tableDataRow.spicture = tableDataRow.sPicturePath; | ||
| 130 | tableDataRow.sFileName = file.response && file.response.code === 1 ? file.name : ''; | 132 | tableDataRow.sFileName = file.response && file.response.code === 1 ? file.name : ''; |
| 131 | tableData.push(tableDataRow); | 133 | tableData.push(tableDataRow); |
| 132 | - console.log('12', tableData); | ||
| 133 | // this.props.onSaveState({ [`${name}Data`]: tableData, enabled: true }); | 134 | // this.props.onSaveState({ [`${name}Data`]: tableData, enabled: true }); |
| 134 | } else if (file.response && file.response.code === -1) { | 135 | } else if (file.response && file.response.code === -1) { |
| 135 | message.error(file.response.msg); | 136 | message.error(file.response.msg); |
src/components/QuickQuote/index.jsx
| @@ -1593,7 +1593,18 @@ const MasterComponent = props => { | @@ -1593,7 +1593,18 @@ const MasterComponent = props => { | ||
| 1593 | if (child.sName === "sProductName") { | 1593 | if (child.sName === "sProductName") { |
| 1594 | return ( | 1594 | return ( |
| 1595 | <div className={styles.productNameBtns}> | 1595 | <div className={styles.productNameBtns}> |
| 1596 | - <Button type="link" icon={<UploadOutlined />}></Button> | 1596 | + <Button |
| 1597 | + type="link" | ||
| 1598 | + icon={<UploadOutlined />} | ||
| 1599 | + onClick={() => { | ||
| 1600 | + const { slaveSelectedRowKeys } = props; | ||
| 1601 | + if (commonUtils.isEmptyArr(slaveSelectedRowKeys)) { | ||
| 1602 | + message.warning("请先核价!"); | ||
| 1603 | + return; | ||
| 1604 | + } | ||
| 1605 | + props.onToolBarBtnClick({ key: "BtnUpload" }); | ||
| 1606 | + }} | ||
| 1607 | + ></Button> | ||
| 1597 | </div> | 1608 | </div> |
| 1598 | ); | 1609 | ); |
| 1599 | } | 1610 | } |
src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
| @@ -10058,7 +10058,12 @@ const QuotationComponent = Form.create({ | @@ -10058,7 +10058,12 @@ const QuotationComponent = Form.create({ | ||
| 10058 | </AntdDraggableModal> : '' | 10058 | </AntdDraggableModal> : '' |
| 10059 | } | 10059 | } |
| 10060 | </Layout>} | 10060 | </Layout>} |
| 10061 | - {quickQuoteModelNew && <QuickQuote {...props} bLinkFieledClick={bLinkFieledClick} />} | 10061 | + {quickQuoteModelNew && ( |
| 10062 | + <> | ||
| 10063 | + <div style={{ display: 'none' }}><Toolbar {...props} /></div> | ||
| 10064 | + <QuickQuote {...props} bLinkFieledClick={bLinkFieledClick} /> | ||
| 10065 | + </> | ||
| 10066 | + )} | ||
| 10062 | 10067 | ||
| 10063 | { true ? '' : <AntdDraggableDiv draggableDivClassName="xly-eject"> <a onClick={props.onEjectRight}> <img src={EjectRight} alt="eject" /></a> </AntdDraggableDiv>} | 10068 | { true ? '' : <AntdDraggableDiv draggableDivClassName="xly-eject"> <a onClick={props.onEjectRight}> <img src={EjectRight} alt="eject" /></a> </AntdDraggableDiv>} |
| 10064 | { true ? '' : | 10069 | { true ? '' : |