Prechádzať zdrojové kódy

feat: 修正添加和更新数据,没有加载动画的问题

WANGKANG 8 mesiacov pred
rodič
commit
0d49474201

+ 2 - 2
src/api/modules/demo/AlgorithmConfigTrack.ts

@@ -24,7 +24,7 @@ export const getAlgorithmConfigTrackApi = (id: string | number) => {
  * @returns returns
  */
 export const addAlgorithmConfigTrackApi = (data: AlgorithmConfigTrackForm) => {
-  return http.post<any>('/demo/AlgorithmConfigTrack', data, { loading: false })
+  return http.post<any>('/demo/AlgorithmConfigTrack', data, { loading: true })
 }
 
 /**
@@ -33,7 +33,7 @@ export const addAlgorithmConfigTrackApi = (data: AlgorithmConfigTrackForm) => {
  * @returns returns
  */
 export const updateAlgorithmConfigTrackApi = (data: AlgorithmConfigTrackForm) => {
-  return http.put<any>('/demo/AlgorithmConfigTrack', data, { loading: false })
+  return http.put<any>('/demo/AlgorithmConfigTrack', data, { loading: true })
 }
 
 /**

+ 2 - 2
src/api/modules/demo/AlgorithmModelTrack.ts

@@ -24,7 +24,7 @@ export const getAlgorithmModelTrackApi = (id: string | number) => {
  * @returns returns
  */
 export const addAlgorithmModelTrackApi = (data: AlgorithmModelTrackForm) => {
-  return http.post<any>('/demo/AlgorithmModelTrack', data, { loading: false })
+  return http.post<any>('/demo/AlgorithmModelTrack', data, { loading: true })
 }
 
 /**
@@ -33,7 +33,7 @@ export const addAlgorithmModelTrackApi = (data: AlgorithmModelTrackForm) => {
  * @returns returns
  */
 export const updateAlgorithmModelTrackApi = (data: AlgorithmModelTrackForm) => {
-  return http.put<any>('/demo/AlgorithmModelTrack', data, { loading: false })
+  return http.put<any>('/demo/AlgorithmModelTrack', data, { loading: true })
 }
 
 /**

+ 2 - 2
src/api/modules/demo/DataSeq.ts

@@ -24,7 +24,7 @@ export const getDataSeqApi = (id: string | number) => {
  * @returns returns
  */
 export const addDataSeqApi = (data: DataSeqForm) => {
-  return http.post<any>('/demo/DataSeq', data, { loading: false })
+  return http.post<any>('/demo/DataSeq', data, { loading: true })
 }
 
 /**
@@ -33,7 +33,7 @@ export const addDataSeqApi = (data: DataSeqForm) => {
  * @returns returns
  */
 export const updateDataSeqApi = (data: DataSeqForm) => {
-  return http.put<any>('/demo/DataSeq', data, { loading: false })
+  return http.put<any>('/demo/DataSeq', data, { loading: true })
 }
 
 /**

+ 2 - 2
src/api/modules/demo/TargetDetection.ts

@@ -25,7 +25,7 @@ export const getTargetDetectionApi = (id: string | number) => {
  * @returns returns
  */
 export const addTargetDetectionApi = (data: TargetDetectionForm) => {
-  return http.post<any>('/demo/TargetDetection', data, { loading: false })
+  return http.post<any>('/demo/TargetDetection', data, { loading: true })
 }
 
 /**
@@ -34,7 +34,7 @@ export const addTargetDetectionApi = (data: TargetDetectionForm) => {
  * @returns returns
  */
 export const updateTargetDetectionApi = (data: TargetDetectionForm) => {
-  return http.put<any>('/demo/TargetDetection', data, { loading: false })
+  return http.put<any>('/demo/TargetDetection', data, { loading: true })
 }
 
 /**

+ 2 - 2
src/api/modules/demo/toInfrared.ts

@@ -24,7 +24,7 @@ export const getToInfraredApi = (id: string | number) => {
  * @returns returns
  */
 export const addToInfraredApi = (data: ToInfraredForm) => {
-  return http.post<any>('/demo/toInfrared', data, { loading: false })
+  return http.post<any>('/demo/toInfrared', data, { loading: true })
 }
 
 /**
@@ -33,7 +33,7 @@ export const addToInfraredApi = (data: ToInfraredForm) => {
  * @returns returns
  */
 export const updateToInfraredApi = (data: ToInfraredForm) => {
-  return http.put<any>('/demo/toInfrared', data, { loading: false })
+  return http.put<any>('/demo/toInfrared', data, { loading: true })
 }
 
 /**

+ 2 - 2
src/api/modules/demo/trackSequence.ts

@@ -24,7 +24,7 @@ export const getTrackSequenceApi = (id: string | number) => {
  * @returns returns
  */
 export const addTrackSequenceApi = (data: TrackSequenceForm) => {
-  return http.post<any>('/demo/trackSequence', data, { loading: false })
+  return http.post<any>('/demo/trackSequence', data, { loading: true })
 }
 
 /**
@@ -33,7 +33,7 @@ export const addTrackSequenceApi = (data: TrackSequenceForm) => {
  * @returns returns
  */
 export const updateTrackSequenceApi = (data: TrackSequenceForm) => {
-  return http.put<any>('/demo/trackSequence', data, { loading: false })
+  return http.put<any>('/demo/trackSequence', data, { loading: true })
 }
 
 /**