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

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

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