Merge branch '20220510-委托推送的标段名称包含特殊字符导致weboffice文件创建失败' of http://10.124.128.2:8888/eshop/fe_service_ebtp_frontend into 20220413-zjl-公共服务平台
This commit is contained in:
@ -12,6 +12,7 @@ import { getProMethod } from "@/utils/session";
|
||||
import WebOffice0609, { WebOfficeRefProps } from "@/pages/webOffice/weboffice0609";
|
||||
import moment from "moment";
|
||||
import { AnnouncementGetMsg1, AnnouncementGetMsg2, AnnouncementGetMsg3, AnnouncementGetMsg4 } from "@/utils/AboutAnnouncementHelp";
|
||||
import { trim } from "@/utils/CommonUtils";
|
||||
|
||||
interface BiddingDocumentProps {
|
||||
modalVisible: boolean;
|
||||
@ -213,7 +214,7 @@ const BiddingDocument: React.FC<BiddingDocumentProps> = (props) => {
|
||||
|
||||
let fromData = {
|
||||
"tpId": tpId,
|
||||
"documentName": form.getFieldValue("documentName"),
|
||||
"documentName": trim(form.getFieldValue("documentName")),
|
||||
"documentSetId": form.getFieldValue("documentSetId"),
|
||||
"sections": packageMsg,
|
||||
"contentFileId": ref.current?.DocFileCode,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { trim } from '@/utils/CommonUtils';
|
||||
import { message } from 'antd';
|
||||
import { updateForm } from './service';
|
||||
|
||||
@ -22,6 +23,7 @@ export const changeDict = (dictList: any[], code: any) => {
|
||||
*/
|
||||
|
||||
export const handleUpdate = async (fields: any) => {
|
||||
fields.bidSectName = trim(fields.bidSectName);
|
||||
const success = await updateForm(fields).then((res) => {
|
||||
if (res.code == 200) {
|
||||
message.success('编辑成功');
|
||||
|
@ -7,7 +7,7 @@ import { getSelectName, ProcurementMethodItem, updateUtils } from '../utils';
|
||||
import { getBudgetAmountById, getByProvincesNumber, getDictRegion, getId, getProvince, getProvinces } from '../service';
|
||||
import { getDicData } from '@/utils/session';
|
||||
import '@/assets/lq_style.less';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import { isEmpty, trim } from '@/utils/CommonUtils';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
|
||||
const { Option } = Select;
|
||||
@ -203,6 +203,7 @@ const ProjectDocumentation: React.FC<ProcurementMethodItem> = (props) => {
|
||||
values.regionDictId = isEmpty(values.regionDictId) ? values.regionDictCity : values.regionDictId;
|
||||
}
|
||||
values.regionDictName = regionDictName;
|
||||
values.projectName = trim(values.projectName);
|
||||
!isIPassDecode && (values['isIPassDecode'] = '1');
|
||||
updateUtils(values);
|
||||
//tab标段页解除禁用
|
||||
|
@ -7,7 +7,7 @@ import { getSelectName, ProcurementMethodItem, updateUtils } from '../utils';
|
||||
import { getBudgetAmountById, getByProvincesNumber, getDictRegion, getId, getProvince, getProvinces } from '../service';
|
||||
import { getDicData } from '@/utils/session';
|
||||
import '@/assets/lq_style.less';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import { isEmpty, trim } from '@/utils/CommonUtils';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
const { Option } = Select;
|
||||
|
||||
@ -194,6 +194,7 @@ const ProjectDocumentation: React.FC<ProcurementMethodItem> = (props) => {
|
||||
values.regionDictId = isEmpty(values.regionDictId) ? values.regionDictCity : values.regionDictId;
|
||||
}
|
||||
values.regionDictName = regionDictName;
|
||||
values.projectName = trim(values.projectName);
|
||||
updateUtils(values);
|
||||
//tab标段页解除禁用
|
||||
setTabFlag(false);
|
||||
|
@ -7,7 +7,7 @@ import { getSelectName, ProcurementMethodItem, updateUtils } from '../utils';
|
||||
import { getBudgetAmountById, getByProvincesNumber, getDictRegion, getId, getProvince, getProvinces } from '../service';
|
||||
import { getDicData } from '@/utils/session';
|
||||
import '@/assets/lq_style.less';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import { isEmpty, trim } from '@/utils/CommonUtils';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
const { Option } = Select;
|
||||
|
||||
@ -202,6 +202,7 @@ const ProjectDocumentation: React.FC<ProcurementMethodItem> = (props) => {
|
||||
values.regionDictId = isEmpty(values.regionDictId) ? values.regionDictCity : values.regionDictId;
|
||||
}
|
||||
values.regionDictName = regionDictName;
|
||||
values.projectName = trim(values.projectName);
|
||||
!isIPassDecode && (values['isIPassDecode'] = '1');
|
||||
updateUtils(values);
|
||||
//tab标段页解除禁用
|
||||
|
@ -7,7 +7,7 @@ import { getSelectName, ProcurementMethodItem, updateUtils } from '../utils';
|
||||
import { getByProvincesNumber, getDictRegion, getId, getProvince, getProvinces } from '../service';
|
||||
import { getDicData } from '@/utils/session';
|
||||
import '@/assets/lq_style.less';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import { isEmpty, trim } from '@/utils/CommonUtils';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
const { Option } = Select;
|
||||
|
||||
@ -200,6 +200,7 @@ const ProjectDocumentation: React.FC<ProcurementMethodItem> = (props) => {
|
||||
values.regionDictId = isEmpty(values.regionDictId) ? values.regionDictCity : values.regionDictId;
|
||||
}
|
||||
values.regionDictName = regionDictName;
|
||||
values.projectName = trim(values.projectName);
|
||||
!isIPassDecode && (values['isIPassDecode'] = '1');
|
||||
updateUtils(values);
|
||||
//tab标段页解除禁用
|
||||
|
@ -7,7 +7,7 @@ import { getSelectName, ProcurementMethodItem, updateUtils } from '../utils';
|
||||
import { getBudgetAmountById, getByProvincesNumber, getDictRegion, getId, getProvince, getProvinces } from '../service';
|
||||
import { getDicData } from '@/utils/session';
|
||||
import '@/assets/lq_style.less';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import { isEmpty, trim } from '@/utils/CommonUtils';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
const { Option } = Select;
|
||||
|
||||
@ -204,6 +204,7 @@ const ProjectDocumentation: React.FC<ProcurementMethodItem> = (props) => {
|
||||
values.regionDictId = isEmpty(values.regionDictId) ? values.regionDictCity : values.regionDictId;
|
||||
}
|
||||
values.regionDictName = regionDictName;
|
||||
values.projectName = trim(values.projectName);
|
||||
!isIPassDecode && (values['isIPassDecode'] = '1');
|
||||
updateUtils(values);
|
||||
//tab标段页解除禁用
|
||||
|
@ -5,7 +5,7 @@ import React, { useEffect, useState } from 'react';
|
||||
import { Form, Input, Button, Select, Radio, Col, Row, Modal } from 'antd';
|
||||
import { getSelectName, ProcurementMethodItem, updateUtils } from '../utils';
|
||||
import { getBudgetAmountById, getByProvincesNumber, getDictRegion, getId, getProvince, getProvinces } from '../service';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import { isEmpty, trim } from '@/utils/CommonUtils';
|
||||
import { getDicData } from '@/utils/session';
|
||||
import '@/assets/lq_style.less';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
@ -203,6 +203,7 @@ const ProjectDocumentation: React.FC<ProcurementMethodItem> = (props) => {
|
||||
values.regionDictId = isEmpty(values.regionDictId) ? values.regionDictCity : values.regionDictId;
|
||||
}
|
||||
values.regionDictName = regionDictName;
|
||||
values.projectName = trim(values.projectName);
|
||||
!isIPassDecode && (values['isIPassDecode'] = '1');
|
||||
updateUtils(values);
|
||||
//tab标段页解除禁用
|
||||
|
@ -5,7 +5,7 @@
|
||||
import { Form, Input, Button, Select, Radio, Col, Row, Modal } from 'antd';
|
||||
import { getSelectName, ProcurementMethodItem, updateUtils } from '../utils';
|
||||
import { getBudgetAmountById, getByProvincesNumber, getDictRegion, getId, getProvince, getProvinces } from '../service';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import { isEmpty, trim } from '@/utils/CommonUtils';
|
||||
import { getDicData } from '@/utils/session';
|
||||
import '@/assets/lq_style.less';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
@ -203,6 +203,7 @@ import { btnAuthority } from '@/utils/authority';
|
||||
values.regionDictId = isEmpty(values.regionDictId) ? values.regionDictCity : values.regionDictId;
|
||||
}
|
||||
values.regionDictName = regionDictName;
|
||||
values.projectName = trim(values.projectName);
|
||||
!isIPassDecode && (values['isIPassDecode'] = '1');
|
||||
updateUtils(values);
|
||||
//tab标段页解除禁用
|
||||
|
@ -9,6 +9,7 @@ import {deleteFileObjId, getFileBidList, SnowflakeID} from "@/services/untilServ
|
||||
import ExtendUpload from "@/utils/ExtendUpload";
|
||||
import { UploadProps } from "antd/lib/upload/interface";
|
||||
import WebOffice0609, { WebOfficeRefProps } from "@/pages/webOffice/weboffice0609";
|
||||
import { trim } from "@/utils/CommonUtils";
|
||||
|
||||
interface BiddingDocumentProps {
|
||||
modalVisible: boolean;
|
||||
@ -172,7 +173,7 @@ const BiddingDocument: React.FC<BiddingDocumentProps> = (props) => {
|
||||
|
||||
const fromData = {
|
||||
"tpId": tpId,
|
||||
"documentName": form.getFieldValue("documentName"),
|
||||
"documentName": trim(form.getFieldValue("documentName")),
|
||||
"documentSetId": form.getFieldValue("documentSetId"),
|
||||
"sections": packageMsg,
|
||||
"contentFileId": ref.current?.DocFileCode,
|
||||
|
@ -314,3 +314,13 @@ export const scrollToAnchor = (anchorName: string) => {
|
||||
if (anchorElement) { anchorElement.scrollIntoView({ block: 'start', behavior: 'smooth' }); }
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 删除行首行尾的空白字符方法(包括空格、制表符、换页符等等)
|
||||
* @param str
|
||||
* @returns
|
||||
*/
|
||||
export const trim = (str: string | undefined) => {
|
||||
let _str = str?.replace(/(^\s*)|(\s*$)/g, "");
|
||||
_str = _str?.replace(/[<>|\\/??::*""“”\s\r\n\t]/, "");
|
||||
return _str;
|
||||
}
|
Reference in New Issue
Block a user