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

26967 门户--单位个人中心,,,专场招聘申请,,签到二维码放到列表上

上级 8626d8b7
...@@ -7,6 +7,7 @@ import moment from 'moment'; ...@@ -7,6 +7,7 @@ import moment from 'moment';
import React from 'react'; import React from 'react';
import { findListTaskDefinition } from '@/webPublic/FormInsertDiy/AffairPage/publicApiService'; import { findListTaskDefinition } from '@/webPublic/FormInsertDiy/AffairPage/publicApiService';
import QRCode from 'qrcode.react'; import QRCode from 'qrcode.react';
import styles from './styles.less';
const handleSqlModels = (sqlModels, defaultValues) => { const handleSqlModels = (sqlModels, defaultValues) => {
if (typeof sqlModels === 'undefined' || !Array.isArray(sqlModels)) { if (typeof sqlModels === 'undefined' || !Array.isArray(sqlModels)) {
...@@ -358,25 +359,26 @@ export function handleColumns(columns) { ...@@ -358,25 +359,26 @@ export function handleColumns(columns) {
if (isJSON(text)) { if (isJSON(text)) {
text = JSON.parse(text); text = JSON.parse(text);
} }
if (item.extendType === 'qrCode' && typeof text === 'string') { if (item.extendType === 'qrCode' && text && typeof text === 'string') {
let url = text.includes('http') ? text : config.gateWayPort + text; let url = text.includes('http') ? text : config.gateWayPort + text;
const clickUrl = () => { const clickUrl = () => {
Modal.info({ Modal.info({
title: '二维码', title: item.title,
content: <QRCode content: <div className={styles.erweimaModal}>
bgColor="#FFFFFF" <QRCode
fgColor="#000000" bgColor="#FFFFFF"
level="Q" fgColor="#000000"
size={200} level="Q"
style={{ size={200}
display: 'block', style={{
margin: 'auto', display: 'block',
}} margin: 'auto',
value={url} }}
/>, value={url}
/></div>,
}); });
}; };
return (<a onClick={clickUrl}>查看二维码</a>); return (<a onClick={clickUrl}>查看</a>);
} }
if (item.extendType === 'file' && typeof text === 'string') { if (item.extendType === 'file' && typeof text === 'string') {
let url = text.includes('http') ? text : config.sqlFormsServer + text; let url = text.includes('http') ? text : config.sqlFormsServer + text;
......
.erweimaModal{
display: grid;
align-items: center;
justify-items: center;
width: 230px;
height: 250px;
margin-left: 20px;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论