非标签添加

This commit is contained in:
lyp 2024-12-31 18:31:06 +08:00
parent 81073fd6af
commit 21a778b92d
3 changed files with 123 additions and 63 deletions

View File

@ -337,17 +337,35 @@ export default function CardProj(props: any) {
{/* 标签 */}
<div className='selectTagmax'>
{props.tagArray.map((item: any) => {
const [part1, part2] = item.value.split(':');
if (part2 == 'TAG_NOT') {
return (
// <div className='proj-progress' key={part1} style={{
// border: ' 1px dashed #5a5a5a',
// // display: data.projStatus == 'NORMAL' || data.projStatus == 'EXPIRED' ? 'block' : 'none'
// marginBottom: 10,
// // 禁止换行
// textWrap: 'nowrap'
// }}
// >
// {item.label}
// {/* 提交版权中心 */}
// </div>
<div key={item.value}></div>
);
} else {
return (
<div className='proj-progress' key={item.value} style={{
background: tagIdArray.includes(item.value) ? '#ff7b00' : '',
color: tagIdArray.includes(item.value) ? '#ffffff' : '#5a5a5a',
border: tagIdArray.includes(item.value) ? ' 1px solid #ff7b00' : ' 1px solid #5a5a5a',
background: tagIdArray.includes(part1) ? '#ff7b00' : '',
color: tagIdArray.includes(part1) ? '#ffffff' : '#5a5a5a',
border: tagIdArray.includes(part1) ? ' 1px solid #ff7b00' : ' 1px solid #5a5a5a',
// display: data.projStatus == 'NORMAL' || data.projStatus == 'EXPIRED' ? 'block' : 'none'
}}
onClick={() => {
// console.log('查看数据', item.value);
upTag(item.value, data.projId)
upTag(part1, data.projId)
// upData(item.value)
// props.updata()
}}
@ -356,6 +374,8 @@ export default function CardProj(props: any) {
</div>
)
}
})}
</div>
@ -501,20 +521,38 @@ export default function CardProj(props: any) {
style={{ marginLeft: data.projStatus == 'NORMAL' || data.projStatus == 'EXPIRED' ? 20 : 220, marginRight: 10 }}>
{props.tagArray.map((item: any) => {
const [part1, part2] = item.value.split(':');
if (part2 == 'TAG_NOT') {
return (
// <div className='proj-progress' key={part1} style={{
// border: ' 1px dashed #5a5a5a',
// // display: data.projStatus == 'NORMAL' || data.projStatus == 'EXPIRED' ? 'block' : 'none'
// marginBottom: 10,
// // 禁止换行
// textWrap: 'nowrap'
// }}
// >
// {item.label}
// {/* 提交版权中心 */}
// </div>
<div key={item.value}></div>
);
} else {
return (
<div className='proj-progress' key={item.value} style={{
background: tagIdArray.includes(item.value) ? '#ff7b00' : '',
color: tagIdArray.includes(item.value) ? '#ffffff' : '#5a5a5a',
border: tagIdArray.includes(item.value) ? ' 1px solid #ff7b00' : ' 1px solid #5a5a5a',
background: tagIdArray.includes(part1) ? '#ff7b00' : '',
color: tagIdArray.includes(part1) ? '#ffffff' : '#5a5a5a',
border: tagIdArray.includes(part1) ? ' 1px solid #ff7b00' : ' 1px solid #5a5a5a',
// display: data.projStatus == 'NORMAL' || data.projStatus == 'EXPIRED' ? 'block' : 'none'
marginBottom: 10,
// 禁止换行
textWrap: 'nowrap'
}}
onClick={() => {
// console.log('查看数据', item.value);
upTag(item.value, data.projId)
upTag(part1, data.projId)
// upData(item.value)
// props.updata()
}}
@ -524,6 +562,8 @@ export default function CardProj(props: any) {
</div>
)
}
})}
</div>
</div>

View File

@ -30,7 +30,7 @@ export default function ListProj() {
// }
const keywords = state ? state.keyword : ''
const type = state ? state.type : ''
// const tagNot = state? state.tagNot : ''
const chargeAdditionals = state ? state.chargeAdditionals : ''
const tagDataId = state ? state.tagDataId : ''
const projRemindId = state? state.projRemindId : ''
@ -55,20 +55,21 @@ export default function ListProj() {
// const navigate = useNavigate()
const reqData = (currentPage: number) => {
setProjs([])
const [part1, part2] = tagDataId?tagDataId.split(':'):['', ''];
get<IListPage<IProj>>({
messageApi: messageApi,
// url: '/api/proj/listpage/self',
url: '/api/proj/claim/listpage/self',
config: {
params: {
tagNot:part2 == 'TAG_NOT' ? true : '',
page: currentPage,
rows: 10,
keywords: keywords,
// charge: type,
chargeType: type,
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
tagDataId: part1,
projRemindId: projRemindId,
authorId: authorId,
payStatus: payStatus,

View File

@ -55,7 +55,7 @@ export default function Index() {
// 选项数组
const [tagArray, setTagArray] = useState([])
// const[tagNot,setTagNot] = useState(false)
// 获取标签
const getTag = () => {
get({
@ -65,11 +65,13 @@ export default function Index() {
},
onSuccess(data: any) {
// console.log('标签信息', data);
console.log('标签信息', data);
const newarrty: any = (data.data).map((item: any) => ({
value: item.key,
label: item.value
}));
// console.log('标签信息', newarrty);
setTagArray(newarrty)
},
@ -94,7 +96,7 @@ export default function Index() {
value: item.projRemindId,
label: item.title
}));
// // console.log('标签信息', newarrty);
// console.log('标签信息', newarrty);
setRemindTagArray(newarrty)
@ -849,7 +851,8 @@ export default function Index() {
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId
projRemindId: projRemindId,
// tagNot
}
})
}
@ -891,7 +894,8 @@ export default function Index() {
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId
projRemindId: projRemindId,
// tagNot
}
})
@ -909,7 +913,8 @@ export default function Index() {
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId
projRemindId: projRemindId,
// tagNot
}
})
@ -1246,7 +1251,8 @@ export default function Index() {
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId
projRemindId: projRemindId,
// tagNot
}
})
@ -1279,7 +1285,8 @@ export default function Index() {
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId
projRemindId: projRemindId,
// tagNot
}
})
@ -1295,14 +1302,20 @@ export default function Index() {
/>
<Select
allowClear
value={tagDataId}
// value={tagDataId}
style={{ height: '31px', width: '130px', marginLeft: 20, display: showSearchBox ? 'block' : 'none' }}
onChange={(value: string) => {
// console.log(`selected ${value}`);
console.log(`selected ${value}`);
// const [part1, part2] = value.split(':');
// console.log('part1:', part1);
// console.log('part2:', part2);
// if (part1 == 'TAG_NOT') {
// setTagNot(true)
// }
settagDataId(value)
// alert(`selected ${value}`)
// lyp
nav('/home', {
state: {
keyword: keywords,
@ -1311,7 +1324,8 @@ export default function Index() {
tagDataId: value,
authorId: authorId,
payStatus: payStatus,
projRemindId: projRemindId
projRemindId: projRemindId,
// tagNot:part2 == 'TAG_NOT'?true:false
}
})
@ -1346,7 +1360,8 @@ export default function Index() {
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus,
projRemindId: value
projRemindId: value,
// tagNot
}
})
@ -1376,7 +1391,8 @@ export default function Index() {
tagDataId: tagDataId,
authorId: authorId,
payStatus: value,
projRemindId: projRemindId
projRemindId: projRemindId,
// tagNot
}
})
@ -1643,7 +1659,8 @@ export default function Index() {
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus
payStatus: payStatus,
// tagNot
}
})
@ -1669,7 +1686,8 @@ export default function Index() {
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus
payStatus: payStatus,
// tagNot
}
})
@ -1695,7 +1713,8 @@ export default function Index() {
chargeAdditionals: chargeAdditionals,
tagDataId: tagDataId,
authorId: authorId,
payStatus: payStatus
payStatus: payStatus,
// tagNot
}
})