提交 cc906839 authored 作者: 钟是志's avatar 钟是志

Merge remote-tracking branch 'origin/master'

......@@ -66,16 +66,14 @@ function AuditModal({ form, selectRows, children, getPage }) {
>
<Spin spinning={loading}>
{data && data.isHandle && !!data.taskFormKey ? (
<div style={{ width: 800, margin: 'auto' }}>
<RenderForm
postData={data}
get="web"
isCg="no"
obj={data.hisTaskForm.formData}
table="new"
form={form}
/>
</div>
<RenderForm
postData={data}
get="web"
isCg="no"
obj={data.hisTaskForm.formData}
table="new"
form={form}
/>
) : null}
</Spin>
</Modal>
......
......@@ -4,6 +4,7 @@ import Shell from '@/baseComponent/Shell';
import { ModalInfo } from '@/baseComponent/Modal';
import { addOrEditTableItem } from '@/webPublic/Services';
import { RenderFormByObjId } from '../RenderForm';
import { preHandle } from '@/webPublic/one_stop_public/utils/myutils';
// 单一数据页面模板,页面只是显示和操作一条数据
// 1. 页面显示通过模板id渲染。
......@@ -23,6 +24,7 @@ function SingleDataPageTemplate(props) {
validateFields((err, values) => {
if (err) return;
preHandle(values);
addOrEditTableItem({ objId: tableId, isAdd, data: values }).then(res => {
if (res) {
ModalInfo('保存成功!');
......
......@@ -1667,6 +1667,8 @@ export default class tableCom extends Component {
if (json.isLabel) {
if (obj&&obj.defaultValues && obj.defaultValues[formKey]) {
if(!isEdit ){
console.log(sqlData[key].title)
return (
<Row
style={{
......@@ -1686,7 +1688,32 @@ export default class tableCom extends Component {
color:'rgba(0,0,0,0.85)'
}}
>
{json.label ? json.label : sqlData[key] ? sqlData[key].title : ""}
{json.label ?
<>
{json.label}
<span
style={{
position:'relative',
top:'-0.5px',
margin: '0 8px 0 2px'
}}
>
:
</span>
</>
: sqlData[key] ?
<>
{sqlData[key].title}
<span
style={{
position:'relative',
top:'-0.5px',
margin: '0 8px 0 2px'
}}
>
:
</span>
</>: ""}
</Col>
<Col
span={json.wrapperSpan}
......@@ -2731,6 +2758,18 @@ export default class tableCom extends Component {
}}
>
{title}
{
title
&& <span
style={{
position:'relative',
top:'-0.5px',
margin: '0 8px 0 2px'
}}
>
:
</span>
}
</Col>
<Col
span={json.wrapperSpan}
......
......@@ -82,9 +82,3 @@ text-align: left;
font-weight: bold;
font-family: PingFang-SC-Regular;
}
.row_col_div::after{
content: ":";
position: relative;
top: -0.5px;
margin: 0 8px 0 2px;
}
\ No newline at end of file
......@@ -33,12 +33,12 @@ var canReportError = true;
const errorHandler = error => {
const { response } = error;
console.log(process.env.NODE_ENV)
if (response && response.status) {
const errorText = codeMessage[response.status] || response.statusText;
notification.error({
message: `请求错误`,
description: errorText,
description: process.env.NODE_ENV==='development'? errorText:'',
});
if (response.status === 401) {
......@@ -98,14 +98,14 @@ export const request = (url, data, options = {}) => {
if (response.errCode || response.errMsg) {
notification.error({
message: `请求错误`,
description: response.errMsg,
description: process.env.NODE_ENV==='development'? response.errMsg:'',
});
return;
}
if (response.errcode) {
notification.error({
message: `请求错误`,
description: response.errmsg,
description: process.env.NODE_ENV==='development'? response.errmsg:'',
});
return;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论