工作台支持+号的展示
This commit is contained in:
parent
be8bafe1e0
commit
b07430d3b2
@ -436,8 +436,8 @@ function formatSessionName(session, index) {
|
||||
(session.projectName && rawName.includes(session.projectName))
|
||||
);
|
||||
if (rawName && !isAutoCompound) {
|
||||
const numericMatch = rawName.match(/^(?:第\s*)?(\d+)(?:\s*场)?$/);
|
||||
if (numericMatch) return `第 ${parseInt(numericMatch[1], 10)} 场`;
|
||||
const numericMatch = rawName.match(/^(?:第\s*)?(\d+)\s*(\+?)(?:\s*场)?$/);
|
||||
if (numericMatch) return `第 ${parseInt(numericMatch[1], 10)}${numericMatch[2] || ''} 场`;
|
||||
return rawName;
|
||||
}
|
||||
const no = String(session.sessionNo || '').trim();
|
||||
@ -476,6 +476,9 @@ function formatSessionText(sessionNo) {
|
||||
return String(sessionNo).replace(/^EP/i, '场次 ');
|
||||
}
|
||||
function rowSessionDisplay(row){
|
||||
const sessionName=String(row?._session?.sessionName??'').trim();
|
||||
const importedSession=sessionName.match(/^(?:第\s*)?(\d+)\s*(\+?)(?:\s*场)?$/);
|
||||
if(importedSession)return `第${importedSession[1]}${importedSession[2]}场`;
|
||||
const sessionOrder=Number(row?.sessionOrder);
|
||||
if(Number.isInteger(sessionOrder)&&sessionOrder>0)return `第${sessionOrder}场`;
|
||||
const session=row?._session;if(!session)return '—';return formatSessionName(session,session._sourceIndex).replace(/\s+/g,'');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user