Browse Source

异常上报添加处理

yuanliang 10 months ago
parent
commit
948329a55e
2 changed files with 26 additions and 4 deletions
  1. 24 2
      src/views/system-manage/expection-log/index.tsx
  2. 2 2
      vite.config.ts

+ 24 - 2
src/views/system-manage/expection-log/index.tsx

@@ -7,6 +7,7 @@ import TheTooltip from '@/components/TheTooltip'
 import SaveForm from "@components/save-form";
 import {getMapValueByKey, getSelectDataFromObj} from "@/utils/objectUtil";
 import {appKey, appType, clientType, deviceType, exceptionType} from "@/utils/constant";
+import {filterTimes, getTimes} from "@/utils/dateUtil";
 
 export default defineComponent({
   name: 'expection-log-index',
@@ -24,8 +25,10 @@ export default defineComponent({
         phone: null,
         appType: null,
         exceptionType: null,
-        exceptionTime: null,
         deviceType: null,
+        exceptionTime: null,
+        exceptionStartTime: null,
+        exceptionEndTime: null,
       },
       dataList: [] as any
     })
@@ -41,7 +44,12 @@ export default defineComponent({
     const getList = async () => {
       try {
         state.loading = true
-        const {data} = await sysExceptionLogPage({...state.pagination, ...state.searchForm})
+        const {data} = await sysExceptionLogPage({
+          ...state.pagination,
+          ...state.searchForm,
+          ...getTimes(state.searchForm.exceptionTime, ['exceptionStartTime', 'exceptionEndTime']),
+            },
+        )
         state.loading = false
         state.pagination.pageTotal = Number(data.total)
         state.dataList = data.rows || []
@@ -114,6 +122,10 @@ export default defineComponent({
           key: 'deviceVersion'
         },
         {
+          title: '异常时间',
+          key: 'exceptionTime'
+        },
+        {
           title: '内容',
           key: 'content',
           width: 400,
@@ -174,6 +186,16 @@ export default defineComponent({
                   clearable
               />
             </NFormItem>
+            <NFormItem label="异常时间" path="exceptionTime">
+              <NDatePicker
+                  v-model:value={state.searchForm.exceptionTime}
+                  type="daterange"
+                  clearable
+                  value-format="yyyy-MM-dd HH:mm:dd"
+                  startPlaceholder="开始时间"
+                  endPlaceholder="结束时间"
+              />
+            </NFormItem>
             <NFormItem>
               <NSpace>
                 <NButton type="primary" onClick={onSearch}>

+ 2 - 2
vite.config.ts

@@ -19,9 +19,9 @@ function pathResolve(dir: string) {
 }
 
 // const proxyUrl = 'https://dev.lexiaoya.cn'
-// const proxyUrl = 'http://127.0.0.1:7293/'
+const proxyUrl = 'http://127.0.0.1:7293/'
 // const proxyUrl = 'https://resource.colexiu.com/'
-const proxyUrl = 'https://dev.resource.colexiu.com'
+// const proxyUrl = 'https://dev.resource.colexiu.com'
 // https://test.resource.colexiu.com/
 
 export default ({ command, mode }: ConfigEnv): UserConfig => {