| | |
| | | ); |
| | | }; |
| | | |
| | | export const MissionCardContent = ({ |
| | | provided, |
| | | snapshot, |
| | | mission, |
| | | }) => { |
| | | export const MissionCardContent = ({ provided, snapshot, mission, }) => { |
| | | const redirect = useRedirect(); |
| | | const handleClick = () => { |
| | | redirect(`/mission/${mission.id}/show`, undefined, undefined, undefined, { |
| | |
| | | {mission.groupNo} |
| | | </Typography> |
| | | <Typography variant="caption" color="textSecondary"> |
| | | 1 |
| | | {mission.posType} |
| | | </Typography> |
| | | </Box> |
| | | </Box> |
| | |
| | | > |
| | | <Stack alignItems="center"> |
| | | <Typography variant="subtitle1"> |
| | | 1 |
| | | {/* {findDealLabel(dealStages, stage)} */} |
| | | {stage} |
| | | </Typography> |
| | | <Typography |
| | | variant="subtitle1" |
| | | color="text.secondary" |
| | | fontSize="small" |
| | | > |
| | | 2 |
| | | {missions.length} |
| | | </Typography> |
| | | </Stack> |
| | | <Droppable droppableId={stage}> |
| | |
| | | import { useEffect, useState } from 'react'; |
| | | import { DragDropContext } from '@hello-pangea/dnd'; |
| | | import { Box } from '@mui/material'; |
| | | import isEqual from 'lodash/isEqual'; |
| | | import { useEffect, useState } from 'react'; |
| | | import { useDataProvider, useListContext } from 'react-admin'; |
| | | |
| | | import { |
| | | useDataProvider, |
| | | useListContext, |
| | | useNotify, |
| | | useRefresh, |
| | | useTranslate, |
| | | } from 'react-admin'; |
| | | import { MissionColumn } from './MissionColumn'; |
| | | import request from '@/utils/request'; |
| | | |
| | | export const MissionListContent = () => { |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const { data, isPending, refetch } = useListContext(); |
| | | const dataProvider = useDataProvider(); |
| | | |
| | | const [stages, setStages] = useState([]); |
| | | |
| | | // const [dealsByStage, setDealsByStage] = useState( |
| | | // getDealsByStage([], dealStages) |
| | | // ); |
| | | |
| | | useEffect(() => { |
| | | const httpStages = async () => { |
| | | request.post('/mission/posType/list').then(res => { |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | setStages(data); |
| | | } else { |
| | | notify(msg || 'common.response.fail', { type: 'error', messageArgs: { _: msg } }); |
| | | } |
| | | }).catch(error => { |
| | | notify(error.message || 'common.response.fail', { type: 'error', messageArgs: { _: error.message } }); |
| | | }) |
| | | } |
| | | httpStages(); |
| | | }, []); |
| | | |
| | | useEffect(() => { |
| | | // if (data) { |
| | |
| | | // }); |
| | | }; |
| | | |
| | | const columns = ['a', 'b'] |
| | | |
| | | return ( |
| | | <DragDropContext onDragEnd={onDragEnd}> |
| | | <Box display="flex"> |
| | | {columns.map(column => ( |
| | | {stages.map(stage => ( |
| | | <MissionColumn |
| | | stage={column} |
| | | missions={data} |
| | | key={column} |
| | | key={stage} |
| | | stage={stage} |
| | | missions={data.filter(item => item.posType === stage)} |
| | | /> |
| | | ))} |
| | | </Box> |
| | |
| | | |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.framework.common.R; |
| | | import com.zy.acs.manager.core.domain.TaskPosDto; |
| | | import com.zy.acs.manager.manager.service.MissionService; |
| | | import com.zy.acs.manager.manager.service.SegmentService; |
| | | import com.zy.acs.manager.system.controller.BaseController; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | return R.ok().add(Cools.add("total", Integer.MAX_VALUE).add("records", missionService.getList())); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:mission:list')") |
| | | @PostMapping("/mission/posType/list") |
| | | public R posTypeList() { |
| | | List<String> list = new ArrayList<>(); |
| | | for (TaskPosDto.PosType value : TaskPosDto.PosType.values()) { |
| | | list.add(value.toString()); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | private Long id; |
| | | |
| | | String groupNo; |
| | | private String groupNo; |
| | | |
| | | private String posType; |
| | | |
| | | } |
| | |
| | | return null; |
| | | } |
| | | Segment segment = list.get(0); |
| | | |
| | | MissionVo vo = new MissionVo(); |
| | | vo.setGroupNo(groupNo); |
| | | vo.setId(segment.getId()); |
| | | vo.setPosType(segment.getPosType()); |
| | | |
| | | return vo; |
| | | } |
| | | |