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

二维码页面修改

上级 30db6b0c
...@@ -359,27 +359,32 @@ export function handleColumns(columns) { ...@@ -359,27 +359,32 @@ export function handleColumns(columns) {
if (isJSON(text)) { if (isJSON(text)) {
text = JSON.parse(text); text = JSON.parse(text);
} }
if (item.extendType === 'qrCode' && text && typeof text === 'string') { if (item.extendType === 'qrCode') {
let url = text.replace('{window.location.origin}', config.gateWayPort); if (text && typeof text === 'string' && text) {
console.log(url); let url = text.replace('{window.location.origin}', config.gateWayPort);
const clickUrl = () => { console.log(url);
Modal.info({ const clickUrl = () => {
title: item.title, Modal.info({
content: <div className={styles.erweimaModal}> title: item.title,
<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} }}
/></div>, value={url}
}); /></div>,
}; });
return (<a onClick={clickUrl}>查看</a>); };
return (<a onClick={clickUrl}>查看</a>);
} else {
return <span>暂无</span>;
}
} }
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;
...@@ -422,7 +427,6 @@ export function handleColumns(columns) { ...@@ -422,7 +427,6 @@ export function handleColumns(columns) {
item.render = (text, record) => { item.render = (text, record) => {
if (!isNaN(Number(text)) && Number(text) > 10000000) { if (!isNaN(Number(text)) && Number(text) > 10000000) {
text = Number(text); text = Number(text);
if (item.dataFormatStrWeb) { if (item.dataFormatStrWeb) {
...@@ -431,10 +435,10 @@ export function handleColumns(columns) { ...@@ -431,10 +435,10 @@ export function handleColumns(columns) {
} }
return moment(text) return moment(text)
.format(format[item.dataType]); .format(format[item.dataType]);
}else if(typeof text === 'string' && text.length > 5){ } else if (typeof text === 'string' && text.length > 5) {
return moment(text).format(item.dataFormatStrWeb || 'YYYY-MM-DD'); return moment(text)
} .format(item.dataFormatStrWeb || 'YYYY-MM-DD');
else { } else {
return ''; return '';
} }
}; };
......
...@@ -857,7 +857,11 @@ export default class ZdyTable extends Component { ...@@ -857,7 +857,11 @@ export default class ZdyTable extends Component {
cell.content = { cell.content = {
...cell.content, ...cell.content,
...getActiveJson(currentFormKey, cell.uuid), ...getActiveJson(currentFormKey, cell.uuid),
}; };
if(window.zdyTableTemplateWillMountProps?.allDisabled){
cell.content.disabled = true;
}
} }
// 27282 双选会报名后管理员修改举办时间 但是单位申请信息么有随着更新 // 27282 双选会报名后管理员修改举办时间 但是单位申请信息么有随着更新
} }
......
...@@ -42,7 +42,7 @@ export default function prepareShow(postData = {}, content = '') { ...@@ -42,7 +42,7 @@ export default function prepareShow(postData = {}, content = '') {
}; };
let newFunc = new Function('props', g); let newFunc = new Function('props', g);
console.log('开始执行templateWillMount公式'); console.log('开始执行templateWillMount公式');
window.zdyTableTemplateWillMountInit = true; window.zdyTableTemplateWillMountProps = true;
try { try {
newFunc(p) // 返回一个promise newFunc(p) // 返回一个promise
.then(res => { .then(res => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论