Преглед на файлове

chore(发现bug): 发现bug

在点击sdk页面后再点击其他页面系统不发送请求,如果不点击sdk页面,其他页面之间切换就没有问题。
wyoujia преди 1 година
родител
ревизия
7396767fe0

+ 4 - 3
admin.ui.plus-master/src/api/admin/deviceAuthorization/oilSdkAuthor.ts

@@ -1,7 +1,7 @@
-import {ContentType, HttpClient, } from "/@/api/admin/http-client";
+import {ContentType, HttpClient, RequestParams,} from "/@/api/admin/http-client";
 import {oilSdkAuthorDtoResult, oilSdkAuthorPostPageDto} from "/@/api/admin/deviceAuthorization/oilSdkAuthorDto";
 
-export class OilSdkAuthor<SecurityDataType = unknown> extends HttpClient<SecurityDataType>{
+export class OilSdkAuthorAPI<SecurityDataType = unknown> extends HttpClient<SecurityDataType>{
 
  /**
  * No description
@@ -12,7 +12,7 @@ export class OilSdkAuthor<SecurityDataType = unknown> extends HttpClient<Securit
  * @request GET:
  * @secure
  */
- getPageData = (query: oilSdkAuthorPostPageDto) =>
+ getPageData = (query: oilSdkAuthorPostPageDto, params: RequestParams = {}) =>
    this.request<oilSdkAuthorDtoResult, any>({
      path:'/api/app/fueiling-sdk-auth/get-page',
      method: 'GET',
@@ -20,5 +20,6 @@ export class OilSdkAuthor<SecurityDataType = unknown> extends HttpClient<Securit
      type: ContentType.Json,
      format: 'json',
      query:query,
+     ...params
    })
 }

+ 35 - 19
admin.ui.plus-master/src/views/admin/authorize/fuelingsdk.vue → admin.ui.plus-master/src/views/admin/authorize/index.vue

@@ -100,7 +100,7 @@
 <script setup lang="ts" name="authorize/fuelingsdk">
 import {defineAsyncComponent, onMounted, reactive, ref, watch} from "vue";
 import {OilSdkAuthorDto, oilSdkFilterModel, oilSdkTableModel} from "/@/api/admin/deviceAuthorization/oilSdkAuthorDto";
-import {OilSdkAuthor} from "/@/api/admin/deviceAuthorization/oilSdkAuthor";
+import {OilSdkAuthorAPI} from "/@/api/admin/deviceAuthorization/oilSdkAuthor";
 import type {pageInput} from "/@/api/admin/shareDto/shareDto";
 
 /**引入组件*/
@@ -149,6 +149,22 @@ const sdkData = reactive({
   total: 0,
 } as OilSdkAuthorDto)
 
+/**初始化 */
+const init = async () => {
+  sdkData.loading = true
+  const query = flattenObject({ Filter: sdkData.Filter})
+  const res = await new OilSdkAuthorAPI().getPageData({...sdkData.pageInput, ...query}).catch(() => {
+    sdkData.loading = false
+  })
+  sdkData.tableModel = res?.data?.list ?? []
+  sdkData.total = res?.data?.total ?? 0
+  sdkData.loading = false
+}
+
+onMounted(() => {
+  init()
+})
+
 /**
  * 监听时间变换
  */
@@ -187,14 +203,24 @@ const onAdd = () => {
   editDialogRef.value.openDialog()
 }
 
-/**初始化 */
-const init = async () => {
-  sdkData.loading = true
-  const query = flattenObject({...sdkData.pageInput, Filter: sdkData.Filter})
-  const res = await new OilSdkAuthor().getPageData(query)
-  sdkData.tableModel = res?.data?.list ?? []
-  sdkData.total = res?.data?.total ?? 0
-  sdkData.loading = false
+/**页条数变化*/
+const onSizeChange = () => {
+  init()
+}
+
+/**页数变化*/
+const onCurrentChange = () =>{
+  init()
+}
+
+/**批量导入*/
+const uploadFiles = () =>{
+
+}
+
+/**导出表格*/
+const exportTable = () =>{
+
 }
 
 /**将Filter对象成.的连接方式*/
@@ -220,17 +246,7 @@ const editTableData = (row) => {
   editDialogRef.value.openDialog(row)
 }
 
-const onSizeChange = () => {
-  init()
-}
-
-const onCurrentChange = () =>{
-  init()
-}
 
-onMounted(() => {
-  init()
-})
 </script>
 
 <style scoped lang="scss">

+ 2 - 2
admin.ui.plus-master/src/views/admin/product/goodInfo.vue

@@ -41,7 +41,7 @@
           <el-table v-loading="goods.loadingProduct" :data="goods.productionLog.tableData" row-key="id" style="width: 100%">
             <el-table-column v-for="column in goods.productionLog.dynamicColumns" :key="column.prop" :prop="column.prop" :label="column.label"  />
           </el-table>
-          <div class="my-flex my-flex-end" v-if="goods.productionLog.pageInput" style="margin-top: 20px">
+          <div class="my-flex my-flex-end"  style="margin-top: 20px">
             <el-pagination
               v-model:currentPage="goods.productionLog.pageInput.CurrentPage"
               v-model:page-size="goods.productionLog.pageInput.PageSize"
@@ -63,7 +63,7 @@
           <el-table v-loading="goods.loadingAlarm" :data="goods.alarmLog.tableData" row-key="id" style="width: 100%">
             <el-table-column v-for="column in goods.alarmLog.dynamicColumns" :key="column.prop" :prop="column.prop" :label="column.label"  />
           </el-table>
-          <div class="my-flex my-flex-end" v-if="goods.alarmLog.pageInput" style="margin-top: 20px">
+          <div class="my-flex my-flex-end"  style="margin-top: 20px">
             <el-pagination
               v-model:currentPage="goods.alarmLog.pageInput.CurrentPage"
               v-model:page-size="goods.alarmLog.pageInput.PageSize"

+ 0 - 1
admin.ui.plus-master/src/views/admin/product/index.vue

@@ -204,7 +204,6 @@ const onQuery = async () => {
   const res = await new ComponentApi().getPage({ ...bomModel.pageInput, filter: bomModel.filterModel }).catch(() => {
     bomModel.loading = false
   })
-  console.log(res)
   bomModel.bomListData = res?.data?.list ?? []
   bomModel.total = res?.data?.total ?? 0
   bomModel.loading = false