|
|
@ -10,13 +10,14 @@ import code from '@/static/img/code.png' |
|
|
|
import Icon from "@/components/icon"; |
|
|
|
import Icon from "@/components/icon"; |
|
|
|
import failure from "@/static/img/failure.png" |
|
|
|
import failure from "@/static/img/failure.png" |
|
|
|
import {Profile} from "@/store"; |
|
|
|
import {Profile} from "@/store"; |
|
|
|
|
|
|
|
import DateTimePicker from "@/components/dateTimePicker/dateTimePicker"; |
|
|
|
|
|
|
|
|
|
|
|
const SpotMeeting: FC = () => { |
|
|
|
const SpotMeeting: FC = () => { |
|
|
|
const path = encodeURIComponent("/pages/meeting/meeting") |
|
|
|
const path = encodeURIComponent("/pages/meeting/meeting") |
|
|
|
const params = Taro.getCurrentInstance().router?.params as { id: string | undefined } |
|
|
|
const params = Taro.getCurrentInstance().router?.params as { id: string | undefined } |
|
|
|
const [manages, setManages] = useState<Manage[]>([]) |
|
|
|
const [manages, setManages] = useState<Manage[]>([]) |
|
|
|
const [start, setStart] = useState<string>(formatDate(new Date(new Date().getTime() + 24 * 60 * 60 * 1000), "YY-MM-dd hh:00:00")) |
|
|
|
const [start, setStart] = useState<string>(formatDate(new Date(new Date().getTime() + 24 * 60 * 60 * 1000), "YY-MM-dd 08:00")) |
|
|
|
const [end, setEnd] = useState<string>(formatDate(new Date(new Date().getTime() + 24 * 60 * 60 * 1000), "YY-MM-dd 18:00:00")) |
|
|
|
const [end, setEnd] = useState<string>(formatDate(new Date(new Date().getTime() + 24 * 60 * 60 * 1000), "YY-MM-dd 18:00")) |
|
|
|
const [depid, setDepid] = useState<number | null>(null) |
|
|
|
const [depid, setDepid] = useState<number | null>(null) |
|
|
|
const [imgUrl, setImgUrl] = useState('') |
|
|
|
const [imgUrl, setImgUrl] = useState('') |
|
|
|
const [name, setName] = useState('') |
|
|
|
const [name, setName] = useState('') |
|
|
@ -41,8 +42,8 @@ const SpotMeeting: FC = () => { |
|
|
|
|
|
|
|
|
|
|
|
if (res) { |
|
|
|
if (res) { |
|
|
|
downUrl(res.id, false) |
|
|
|
downUrl(res.id, false) |
|
|
|
setEnd(formatDate(new Date(res.estimate_end_time), "YY-MM-dd 18:00:00")) |
|
|
|
setEnd(formatDate(new Date(res.estimate_end_time), "YY-MM-dd 18:00")) |
|
|
|
setStart(formatDate(new Date(res.estimate_start_time), "YY-MM-dd 08:00:00")) |
|
|
|
setStart(formatDate(new Date(res.estimate_start_time), "YY-MM-dd 08:00")) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
setLoading(false) |
|
|
|
setLoading(false) |
|
|
@ -67,6 +68,7 @@ const SpotMeeting: FC = () => { |
|
|
|
const depChange = useCallback((e) => { |
|
|
|
const depChange = useCallback((e) => { |
|
|
|
setDepid(manages[Number(e.detail.value)]?.id) |
|
|
|
setDepid(manages[Number(e.detail.value)]?.id) |
|
|
|
}, [manages]) |
|
|
|
}, [manages]) |
|
|
|
|
|
|
|
|
|
|
|
const change_start = useCallback((time: string) => { |
|
|
|
const change_start = useCallback((time: string) => { |
|
|
|
const mil = new Date(time).getTime() |
|
|
|
const mil = new Date(time).getTime() |
|
|
|
const endMil = new Date(end).getTime() |
|
|
|
const endMil = new Date(end).getTime() |
|
|
@ -76,6 +78,7 @@ const SpotMeeting: FC = () => { |
|
|
|
setStart(time) |
|
|
|
setStart(time) |
|
|
|
} |
|
|
|
} |
|
|
|
}, [end]) |
|
|
|
}, [end]) |
|
|
|
|
|
|
|
|
|
|
|
const change_end = useCallback((time: string) => { |
|
|
|
const change_end = useCallback((time: string) => { |
|
|
|
const mil = new Date(time).getTime() |
|
|
|
const mil = new Date(time).getTime() |
|
|
|
const startMil = new Date(start).getTime() |
|
|
|
const startMil = new Date(start).getTime() |
|
|
@ -243,7 +246,7 @@ const SpotMeeting: FC = () => { |
|
|
|
? <Image |
|
|
|
? <Image |
|
|
|
src={imgUrl} |
|
|
|
src={imgUrl} |
|
|
|
mode='aspectFit' |
|
|
|
mode='aspectFit' |
|
|
|
style={{width: '150px'}} |
|
|
|
style={{width: '200px'}} |
|
|
|
onLoad={imagLoad} |
|
|
|
onLoad={imagLoad} |
|
|
|
onError={imagLoad} |
|
|
|
onError={imagLoad} |
|
|
|
fadeIn/> |
|
|
|
fadeIn/> |
|
|
@ -269,22 +272,26 @@ const SpotMeeting: FC = () => { |
|
|
|
onInput={(e) => setName(e.detail.value)} |
|
|
|
onInput={(e) => setName(e.detail.value)} |
|
|
|
/>} |
|
|
|
/>} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<Picker |
|
|
|
|
|
|
|
mode="date" |
|
|
|
<DateTimePicker |
|
|
|
value={start} |
|
|
|
name='estimate_start_time' |
|
|
|
|
|
|
|
defaultValue={start} |
|
|
|
disabled={status === 1} |
|
|
|
disabled={status === 1} |
|
|
|
onChange={(e) => change_start(e.detail.value + ' 8:00:00')} |
|
|
|
onChange={(time) => change_start(time)} |
|
|
|
name='estimate_start_time'> |
|
|
|
> |
|
|
|
<PopPut title='开始时间' content={start}/> |
|
|
|
<PopPut title='开始时间' content={start}/> |
|
|
|
</Picker> |
|
|
|
</DateTimePicker> |
|
|
|
<Picker |
|
|
|
|
|
|
|
mode="date" |
|
|
|
|
|
|
|
value={end} |
|
|
|
<DateTimePicker |
|
|
|
|
|
|
|
name='estimate_end_time' |
|
|
|
|
|
|
|
defaultValue={end} |
|
|
|
disabled={status === 1} |
|
|
|
disabled={status === 1} |
|
|
|
onChange={(e) => change_end(e.detail.value + ' 18:00:00')} |
|
|
|
onChange={(time) => change_end(time)} |
|
|
|
name='estimate_end_time'> |
|
|
|
> |
|
|
|
<PopPut title='结束时间' content={end}/> |
|
|
|
<PopPut title='结束时间' content={end}/> |
|
|
|
</Picker> |
|
|
|
</DateTimePicker> |
|
|
|
|
|
|
|
|
|
|
|
<Picker |
|
|
|
<Picker |
|
|
|
mode='selector' |
|
|
|
mode='selector' |
|
|
|
range={manages} |
|
|
|
range={manages} |
|
|
@ -307,7 +314,6 @@ const SpotMeeting: FC = () => { |
|
|
|
{/*</Textarea>*/} |
|
|
|
{/*</Textarea>*/} |
|
|
|
|
|
|
|
|
|
|
|
<View className='flex justify-between'> |
|
|
|
<View className='flex justify-between'> |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
id !== undefined && <> |
|
|
|
id !== undefined && <> |
|
|
|
{ |
|
|
|
{ |
|
|
|