正在显示
7 个修改的文件
包含
13 行增加
和
8 行删除
@@ -4,6 +4,7 @@ import routes from './router' | @@ -4,6 +4,7 @@ import routes from './router' | ||
4 | import { useAppSelector, useAppDispatch, shallowEqualApp } from './store' | 4 | import { useAppSelector, useAppDispatch, shallowEqualApp } from './store' |
5 | import { changeMessage } from './store/modules/counter' | 5 | import { changeMessage } from './store/modules/counter' |
6 | import EventBus from '@/utils/events' | 6 | import EventBus from '@/utils/events' |
7 | +import AppLoading from './components/appLoading' | ||
7 | 8 | ||
8 | function App() { | 9 | function App() { |
9 | const { counter } = useAppSelector((state) => state, shallowEqualApp) | 10 | const { counter } = useAppSelector((state) => state, shallowEqualApp) |
@@ -24,7 +25,7 @@ function App() { | @@ -24,7 +25,7 @@ function App() { | ||
24 | 25 | ||
25 | return ( | 26 | return ( |
26 | <> | 27 | <> |
27 | - <Suspense fallback="loading..."> | 28 | + <Suspense fallback={<AppLoading />}> |
28 | <div className="App">{useRoutes(routes)}</div> | 29 | <div className="App">{useRoutes(routes)}</div> |
29 | </Suspense> | 30 | </Suspense> |
30 | 31 |
@@ -3,6 +3,5 @@ | @@ -3,6 +3,5 @@ | ||
3 | // const BASE_URL = 'http://127.0.0.1:4523/m1/3332971-0-default/jeecg-boot' // mock | 3 | // const BASE_URL = 'http://127.0.0.1:4523/m1/3332971-0-default/jeecg-boot' // mock |
4 | const BASE_URL = 'https://pet.apple02.brofirst.cn/jeecg-boot' | 4 | const BASE_URL = 'https://pet.apple02.brofirst.cn/jeecg-boot' |
5 | 5 | ||
6 | - | ||
7 | export const TIME_OUT = 10000; | 6 | export const TIME_OUT = 10000; |
8 | export { BASE_URL } | 7 | export { BASE_URL } |
@@ -158,7 +158,7 @@ const SendPrescription: FC<IProps> = memo( | @@ -158,7 +158,7 @@ const SendPrescription: FC<IProps> = memo( | ||
158 | <span>添加处方药</span> | 158 | <span>添加处方药</span> |
159 | </div> | 159 | </div> |
160 | <div className="title">处方单证明:</div> | 160 | <div className="title">处方单证明:</div> |
161 | - <Upload action={BASE_URL + '/sys/common/appUpload'} listType="picture-card" fileList={fileList} onPreview={handlePreview} onChange={handleChange}> | 161 | + <Upload action={BASE_URL + '/sys/common/upload'} listType="picture-card" fileList={fileList} onPreview={handlePreview} onChange={handleChange}> |
162 | {fileList.length >= 3 ? null : uploadButton} | 162 | {fileList.length >= 3 ? null : uploadButton} |
163 | </Upload> | 163 | </Upload> |
164 | <Modal open={previewOpen} title={previewTitle} footer={null} onCancel={handleCancel}> | 164 | <Modal open={previewOpen} title={previewTitle} footer={null} onCancel={handleCancel}> |
@@ -51,8 +51,9 @@ const ViewSymptom: FC<IProps> = memo((props) => { | @@ -51,8 +51,9 @@ const ViewSymptom: FC<IProps> = memo((props) => { | ||
51 | <div className="row"> | 51 | <div className="row"> |
52 | 就诊宠物: | 52 | 就诊宠物: |
53 | <span> | 53 | <span> |
54 | - {orderDetail?.petClass}/{orderDetail?.age || '年龄未知'}/{GHandler.optObjectValue('petSex', orderDetail?.petSex as any)}/ | ||
55 | - {GHandler.optObjectValue('isSterilization', orderDetail?.isSterilization as any)}/{orderDetail?.weight ? orderDetail?.weight + 'kg' : '体重未知'} | 54 | + {orderDetail?.petName || '姓名未知'}/{orderDetail?.petClass}/{orderDetail?.age || '年龄未知'}/ |
55 | + {GHandler.optObjectValue('petSex', orderDetail?.petSex as any)}/{GHandler.optObjectValue('isSterilization', orderDetail?.isSterilization as any)}/ | ||
56 | + {orderDetail?.weight ? orderDetail?.weight + 'kg' : '体重未知'} | ||
56 | </span> | 57 | </span> |
57 | </div> | 58 | </div> |
58 | <div className="row"> | 59 | <div className="row"> |
@@ -23,6 +23,7 @@ export const SendPrescriptionWrapper = styled.div` | @@ -23,6 +23,7 @@ export const SendPrescriptionWrapper = styled.div` | ||
23 | box-sizing: border-box; | 23 | box-sizing: border-box; |
24 | padding: 13px 0; | 24 | padding: 13px 0; |
25 | background: #F3FFFF; | 25 | background: #F3FFFF; |
26 | + cursor: pointer; | ||
26 | .blueIcon{ | 27 | .blueIcon{ |
27 | font-size: 18px; | 28 | font-size: 18px; |
28 | color: #09b9d3; | 29 | color: #09b9d3; |
@@ -26,6 +26,7 @@ message.config({ | @@ -26,6 +26,7 @@ message.config({ | ||
26 | 26 | ||
27 | const ShowOrderComHandler: FC<IProps> = (props) => { | 27 | const ShowOrderComHandler: FC<IProps> = (props) => { |
28 | const { orderList } = props | 28 | const { orderList } = props |
29 | + const dispatch = useAppDispatch() | ||
29 | const [open, setOpenHandler] = useState(false) | 30 | const [open, setOpenHandler] = useState(false) |
30 | const [confirmLoading, setConfirmLoading] = useState(false) | 31 | const [confirmLoading, setConfirmLoading] = useState(false) |
31 | const [modalTitle, setModalTitle] = useState<string>(' ') | 32 | const [modalTitle, setModalTitle] = useState<string>(' ') |
@@ -91,6 +92,8 @@ const ShowOrderComHandler: FC<IProps> = (props) => { | @@ -91,6 +92,8 @@ const ShowOrderComHandler: FC<IProps> = (props) => { | ||
91 | 92 | ||
92 | typeof instance?.setFileList === 'function' && instance.setFileList([]) | 93 | typeof instance?.setFileList === 'function' && instance.setFileList([]) |
93 | 94 | ||
95 | + dispatch(fetchOrderDataAction({ pageNo: 1 })) | ||
96 | + | ||
94 | // console.log(SendPrescriptionRef.current, 'SendPrescription 子组件实例') | 97 | // console.log(SendPrescriptionRef.current, 'SendPrescription 子组件实例') |
95 | 98 | ||
96 | return | 99 | return |
@@ -143,7 +146,7 @@ const ShowOrderComHandler: FC<IProps> = (props) => { | @@ -143,7 +146,7 @@ const ShowOrderComHandler: FC<IProps> = (props) => { | ||
143 | <Button type="primary" shape="round" onClick={() => showModalHandler(1, _.id)}> | 146 | <Button type="primary" shape="round" onClick={() => showModalHandler(1, _.id)}> |
144 | 查看症状 | 147 | 查看症状 |
145 | </Button> | 148 | </Button> |
146 | - {[30, '30'].includes(_.orderState as string | number) && ( | 149 | + {[30, '30'].includes(_.orderState as string | number) && [null, undefined, ''].includes(_?.orderId) && ( |
147 | <Button type="primary" shape="round" onClick={() => showModalHandler(2, _.id)}> | 150 | <Button type="primary" shape="round" onClick={() => showModalHandler(2, _.id)}> |
148 | 发送处方单 | 151 | 发送处方单 |
149 | </Button> | 152 | </Button> |
@@ -21,7 +21,7 @@ const Login: FC<IProps> = memo(() => { | @@ -21,7 +21,7 @@ const Login: FC<IProps> = memo(() => { | ||
21 | 21 | ||
22 | const [messageApi, contextHolder] = message.useMessage() | 22 | const [messageApi, contextHolder] = message.useMessage() |
23 | 23 | ||
24 | - const [form, setForm] = useState<PhoneCodeLoginParamsType>({ phoneNum: '', code: '10086' }) | 24 | + const [form, setForm] = useState<PhoneCodeLoginParamsType>({ phoneNum: '', code: '' }) |
25 | 25 | ||
26 | const [countdown, startCountdown] = useTimeHandler() | 26 | const [countdown, startCountdown] = useTimeHandler() |
27 | 27 | ||
@@ -48,7 +48,7 @@ const Login: FC<IProps> = memo(() => { | @@ -48,7 +48,7 @@ const Login: FC<IProps> = memo(() => { | ||
48 | 48 | ||
49 | const { result }: { result: PhoneCodeLoginType } = await getMessageLogin(form) | 49 | const { result }: { result: PhoneCodeLoginType } = await getMessageLogin(form) |
50 | 50 | ||
51 | - if(Object.keys(result).length){ | 51 | + if (Object.keys(result).length) { |
52 | localStorage.setItem('token', result.token) | 52 | localStorage.setItem('token', result.token) |
53 | 53 | ||
54 | localStorage.setItem('userId', result.userId) | 54 | localStorage.setItem('userId', result.userId) |
-
请 注册 或 登录 后发表评论