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

一站式图片地址拼接 修改成用同一个函数来处理

上级 323814c1
...@@ -23,9 +23,10 @@ export default class AuditPage extends Component { ...@@ -23,9 +23,10 @@ export default class AuditPage extends Component {
? { ? {
type: 'audit', type: 'audit',
component: 'RenderComponent', component: 'RenderComponent',
key: 'audit', key: 'audit',
render: ({ selectRows, getPage }) => { render: ({ selectRows, getPage }) => {
const disabled = !selectRows || !Array.isArray(selectRows) || !selectRows.length; const disabled = !selectRows || !Array.isArray(selectRows) || !selectRows.length;
function handleClick(onShow) { function handleClick(onShow) {
const taskName = selectRows[0].taskName; const taskName = selectRows[0].taskName;
const differentTask = selectRows.slice(1).find((i) => i.taskName !== taskName); const differentTask = selectRows.slice(1).find((i) => i.taskName !== taskName);
...@@ -42,15 +43,16 @@ export default class AuditPage extends Component { ...@@ -42,15 +43,16 @@ export default class AuditPage extends Component {
} }
onShow(); onShow();
} }
return ( return (
<AuditModal selectRows={selectRows} <AuditModal
getPage={getPage} selectRows={selectRows}
noNeedForm={noNeedForm} getPage={getPage}
key={'audit'} noNeedForm={noNeedForm}
> key={'audit'}>
{({ onShow }) => ( {({ onShow }) => (
<ButtonDiy <ButtonDiy
key={'audit'} key={'audit'}
name={batchAuditButtonName || '批量审核'} name={batchAuditButtonName || '批量审核'}
handleClick={() => handleClick(onShow)} handleClick={() => handleClick(onShow)}
disabled={disabled} disabled={disabled}
...@@ -71,8 +73,8 @@ export default class AuditPage extends Component { ...@@ -71,8 +73,8 @@ export default class AuditPage extends Component {
const tab1 = { const tab1 = {
search: { search: {
field: {}, field: {},
scroll: { x: 'max-content' }, scroll: { x: 'max-content' },
getPageService: getWaitPage, getPageService: getWaitPage,
beforeSearchData: (data) => { beforeSearchData: (data) => {
let searcherKeyValue = {}; let searcherKeyValue = {};
for (let item of searchCondition) { for (let item of searchCondition) {
...@@ -89,14 +91,20 @@ export default class AuditPage extends Component { ...@@ -89,14 +91,20 @@ export default class AuditPage extends Component {
return response; return response;
}, },
condition: searchCondition.filter((g) => { condition: searchCondition.filter((g) => {
if(!allConfigSetInfo.isShowWaitTaskDef){ if (!allConfigSetInfo.isShowWaitTaskDef) {
return g.key !== 'taskDefKey'; return g.key !== 'taskDefKey';
}else{ } else {
return true; return true;
} }
}), }),
nameSpan: { big: 8, small: 9 }, nameSpan: {
fileSpan: { big: 4, small: 4 }, big: 8,
small: 9,
},
fileSpan: {
big: 4,
small: 4,
},
}, },
tableRowKey: 'id', tableRowKey: 'id',
columns, columns,
...@@ -104,8 +112,8 @@ export default class AuditPage extends Component { ...@@ -104,8 +112,8 @@ export default class AuditPage extends Component {
const tab2 = { const tab2 = {
search: { search: {
field: {}, field: {},
scroll: { x: 'max-content' }, scroll: { x: 'max-content' },
getPageService: getHandledPage, getPageService: getHandledPage,
responseCallBack: (response) => { responseCallBack: (response) => {
return response; return response;
}, },
...@@ -121,15 +129,21 @@ export default class AuditPage extends Component { ...@@ -121,15 +129,21 @@ export default class AuditPage extends Component {
} }
return data; return data;
}, },
condition: searchCondition.filter((g) => { condition: searchCondition.filter((g) => {
if(!allConfigSetInfo.isShowHandledTaskDef){ if (!allConfigSetInfo.isShowHandledTaskDef) {
return g.key !== 'taskDefKey'; return g.key !== 'taskDefKey';
}else{ } else {
return true; return true;
} }
}), }),
nameSpan: { big: 8, small: 9 }, nameSpan: {
fileSpan: { big: 4, small: 4 }, big: 8,
small: 9,
},
fileSpan: {
big: 4,
small: 4,
},
}, },
tableRowKey: 'id', tableRowKey: 'id',
columns, columns,
......
...@@ -8,6 +8,8 @@ import React from 'react'; ...@@ -8,6 +8,8 @@ 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'; import styles from './styles.less';
import { getUrlInfo } from '@/webPublic/one_stop_public/DetailForAudit/utils';
import { queryFileUrl } from '@/webPublic/one_stop_public/utils/queryConfig';
const handleSqlModels = (sqlModels, defaultValues) => { const handleSqlModels = (sqlModels, defaultValues) => {
if (typeof sqlModels === 'undefined' || !Array.isArray(sqlModels)) { if (typeof sqlModels === 'undefined' || !Array.isArray(sqlModels)) {
...@@ -386,7 +388,7 @@ export function handleColumns(columns) { ...@@ -386,7 +388,7 @@ export function handleColumns(columns) {
} }
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 = queryFileUrl(text);
return ( return (
<a href={url} target={'_blank'}> <a href={url} target={'_blank'}>
点击查看 点击查看
...@@ -413,7 +415,7 @@ export function handleColumns(columns) { ...@@ -413,7 +415,7 @@ export function handleColumns(columns) {
if(typeof file.path !== 'string' ){ if(typeof file.path !== 'string' ){
return null; return null;
} }
let url = file.path && file.path.includes('http') ? file.path : config.sqlFormsServer + file.path; let url = queryFileUrl(file.path);
return ( return (
<a href={url} target={'_blank'} key={file.name} style={{ marginRight: '10px' }}> <a href={url} target={'_blank'} key={file.name} style={{ marginRight: '10px' }}>
{file.name} {file.name}
......
...@@ -273,7 +273,6 @@ export default class Index extends React.Component { ...@@ -273,7 +273,6 @@ export default class Index extends React.Component {
names.push(this.state.infos[this.state.targetKeys[i]].name); names.push(this.state.infos[this.state.targetKeys[i]].name);
} }
let divElement = document.getElementById('downloadDiv'); let divElement = document.getElementById('downloadDiv');
console.log(config.sqlFormsServer);
let downloadUrl = config.sqlFormsServer + '/DataObjApi/exportFormData?'; let downloadUrl = config.sqlFormsServer + '/DataObjApi/exportFormData?';
const token = getToken() != null && getToken() != 'null' ? getToken() : '0000'; const token = getToken() != null && getToken() != 'null' ? getToken() : '0000';
downloadUrl = `${downloadUrl}token=${token}`; downloadUrl = `${downloadUrl}token=${token}`;
......
import { isJSON } from '@/webPublic/zyd_public/utils/utils'; import { isJSON } from '@/webPublic/zyd_public/utils/utils';
import config from '@/config/config'; import config from '@/config/config';
import { queryFileUrl } from '@/webPublic/one_stop_public/utils/queryConfig';
export default function getOneStopImgUrl(imgStr = '') { export default function getOneStopImgUrl(imgStr = '') {
if (imgStr && isJSON(imgStr)) { if (imgStr && isJSON(imgStr)) {
...@@ -12,7 +13,7 @@ export default function getOneStopImgUrl(imgStr = '') { ...@@ -12,7 +13,7 @@ export default function getOneStopImgUrl(imgStr = '') {
}) })
.map((x) => { .map((x) => {
return { return {
path: config.sqlFormsServer + x?.path, path: queryFileUrl(x?.path),
name: x.name, name: x.name,
}; };
}); });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论