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

26645 招聘统计参照原型完善样式和维度

上级 c0636c6d
import React, { Fragment, Component } from 'react'; import React, { Component } from 'react';
import PageHeaderWrapper from '@/components/PageHeaderWrapper'; import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import Shell from '@/baseComponent/Shell'; import Shell from '@/baseComponent/Shell';
import ButtonDiy from '@/baseComponent/ButtonDiy';
import router from 'umi/router';
import { getToken, setToken } from '@/utils/authority'; import { getToken, setToken } from '@/utils/authority';
import config from '@/config/config'; import config from '@/config/config';
import { getOneStopConfig } from '@/webPublic/zyd_public/utils/utils'; import { getOneStopConfig } from '@/webPublic/zyd_public/utils/utils';
......
...@@ -56,7 +56,8 @@ export default class ImgUploadCom extends React.Component { ...@@ -56,7 +56,8 @@ export default class ImgUploadCom extends React.Component {
accept={'image/*'} accept={'image/*'}
url={url} url={url}
beforeUpload={(file) => { beforeUpload={(file) => {
return zipImage(file, 4); // 图片压缩函数. 超过fileSizeLimitMb兆的图片 直接压缩成原来的 30% 如果后续有其他需求考虑 做成全局配置项 配置可以压缩的图片的范围 return zipImage(file, 4);
// 图片压缩函数. 超过fileSizeLimitMb兆的图片 直接压缩成原来的 30% 如果后续有其他需求考虑 做成全局配置项 配置可以压缩的图片的范围
// 禅道bug 23185 // 禅道bug 23185
}} }}
showUploadList={false} showUploadList={false}
......
import {message} from "antd"; import { message } from 'antd';
import baseX from "base-x"; import baseX from 'base-x';
import moment from "moment"; import moment from 'moment';
import {isNaN} from "lodash"; import { isNaN } from 'lodash';
import React from 'react'; import React from 'react';
import config from "@/webPublic/one_stop_public/config"; import config from '@/webPublic/one_stop_public/config';
const codeMessage = { const codeMessage = {
200: '服务器成功返回请求的数据。', 200: '服务器成功返回请求的数据。',
201: '新建或修改数据成功。', 201: '新建或修改数据成功。',
...@@ -40,6 +41,7 @@ const errorHandler = (error) => { ...@@ -40,6 +41,7 @@ const errorHandler = (error) => {
const Bs64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; const Bs64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
const base64 = baseX(Bs64); const base64 = baseX(Bs64);
export function getBase64(value) { export function getBase64(value) {
return value ? base64.encode(new Buffer(value)) : null; return value ? base64.encode(new Buffer(value)) : null;
} }
...@@ -72,12 +74,14 @@ const equal = (obj1, obj2, json, sqlContent, depth, props, excludeKeys) => { ...@@ -72,12 +74,14 @@ const equal = (obj1, obj2, json, sqlContent, depth, props, excludeKeys) => {
const keys = new Set(); const keys = new Set();
if (obj2 != null) { if (obj2 != null) {
Object.keys(obj2).forEach(k => { Object.keys(obj2)
.forEach(k => {
if (k != '') keys.add(k); if (k != '') keys.add(k);
}); });
} }
if (obj1 != null) { if (obj1 != null) {
Object.keys(obj1).forEach(k => { Object.keys(obj1)
.forEach(k => {
if (k != '') keys.add(k); if (k != '') keys.add(k);
}); });
} }
...@@ -185,7 +189,10 @@ const getRender = (com, props) => { ...@@ -185,7 +189,10 @@ const getRender = (com, props) => {
? props.src ? props.src
: config.httpServer + props.src : config.httpServer + props.src
: null; : null;
const pp = { ...props, src: src }; const pp = {
...props,
src: src
};
return <img {...pp} />; return <img {...pp} />;
} }
}; };
...@@ -209,4 +216,9 @@ const isJSON = str => { ...@@ -209,4 +216,9 @@ const isJSON = str => {
} }
}; };
export { errorHandler, equal, getRender, isJSON }; const ShowComName = ({ json = {} }) => <span
style={{ display: 'none' }}
data-cell-component-name={json.comName || 'no_com'}
/>;
export { errorHandler, equal, getRender, isJSON, ShowComName };
...@@ -57,7 +57,14 @@ import FilePreview from '../filePreview'; ...@@ -57,7 +57,14 @@ import FilePreview from '../filePreview';
import DraftEditorCom from '../App/DraftEditorCom'; import DraftEditorCom from '../App/DraftEditorCom';
import MobileItem from './MobileItem'; import MobileItem from './MobileItem';
import MobileCascader from './CascaderDiy/MobileCascader'; import MobileCascader from './CascaderDiy/MobileCascader';
import { equal, errorHandler, getBase64, getRender, isJSON } from './Split_Index/staticInfo'; import {
equal,
errorHandler,
getBase64,
getRender,
isJSON,
ShowComName
} from './Split_Index/staticInfo';
import PictureSignature, { import PictureSignature, {
SignArray, SignArray,
} from '@/webPublic/one_stop_public/libs/PictureSignature/PictureSignature'; } from '@/webPublic/one_stop_public/libs/PictureSignature/PictureSignature';
...@@ -82,6 +89,9 @@ const giveRender = (column = {}) => { ...@@ -82,6 +89,9 @@ const giveRender = (column = {}) => {
return column; return column;
}; };
@connect(({ DataColumn, SqlManageEntity, formList, loading }) => ({ @connect(({ DataColumn, SqlManageEntity, formList, loading }) => ({
DataColumn, DataColumn,
SqlManageEntity, SqlManageEntity,
...@@ -3809,10 +3819,7 @@ ${obj[dataColumn.base52]} ...@@ -3809,10 +3819,7 @@ ${obj[dataColumn.base52]}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
data-cell-component-name={json.comName || 'no_com'}> data-cell-component-name={json.comName || 'no_com'}>
<span <ShowComName json={json}/>
style={{ display: 'none' }}
data-cell-component-name={json.comName || 'no_com'}
/>
{cm} {cm}
</Form.Item> </Form.Item>
</> </>
...@@ -3902,11 +3909,15 @@ ${obj[dataColumn.base52]} ...@@ -3902,11 +3909,15 @@ ${obj[dataColumn.base52]}
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
data-cell-component-name={json.comName || 'no_com'}> >
<ShowComName json={json}/>
{cm} {cm}
</Form.Item> </Form.Item>
) : ( ) : (
<Form.Item>{cm}</Form.Item> <Form.Item>
<ShowComName json={json} />
{cm}
</Form.Item>
) )
) : ( ) : (
cm cm
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论