Browse Source

字典提示

CzRger 1 year ago
parent
commit
83c163ed50

+ 9 - 0
src/api/modules/login-log.ts

@@ -0,0 +1,9 @@
+import { handle } from '../index'
+
+const suffix = 'api'
+
+export const getLoginLogList = (params: any) => handle({
+  url: `/${suffix}/login/log/list`,
+  method: 'post',
+  params
+})

+ 9 - 0
src/api/modules/oper-log.ts

@@ -0,0 +1,9 @@
+import { handle } from '../index'
+
+const suffix = 'api'
+
+export const getOperationLogList = (params: any) => handle({
+  url: `/${suffix}/operLog/list`,
+  method: 'post',
+  params
+})

+ 2 - 2
src/views/system/dict-manage/detail.vue

@@ -94,11 +94,11 @@ export default defineComponent({
           const apiHandle = props.transfer.method === 'edit' ? that.$api.editDictData(state.cusDetail) : that.$api.addDictData(state.cusDetail)
           apiHandle.then(res => {
             if (res.code === 200) {
-              ElMessage.success(res.msg)
+              ElMessage.success(res.message)
               emit('update:show', false)
               emit('refresh')
             } else {
-              ElMessage.error(res.msg)
+              ElMessage.error(res.message)
             }
             state.loading = false
           }).catch(() => {

+ 5 - 1
src/views/system/dict-manage/index.vue

@@ -59,6 +59,9 @@
               :pageSize="queryPage.pageSize"
               @handlePage="handlePage"
           >
+            <template #updateTime-column-value="{ scope }">
+              {{$util.YMDHms(scope.row.updateTime)}}
+            </template>
             <template #do-column-value="{ scope }">
               <div class="__cus-table_do">
                 <div class="__cus-table_do-green __hover" @click="onView(scope.row)">
@@ -249,9 +252,10 @@ export default defineComponent({
         state.loading = true
         that.$api.delDictData(val.id).then(res => {
           if (res.code === 200) {
+            ElMessage.success(res.message)
             handleSearch()
           } else {
-            ElMessage.error(res.msg)
+            ElMessage.error(res.message)
             state.loading = false
           }
         }).catch(() => {

+ 19 - 28
src/views/system/operation-records/index.vue

@@ -10,14 +10,15 @@
           <CusForm labelWidth="100px" @handleEnter="onSearch">
             <CusFormColumn
                 label="操作人:"
-                v-model:param="queryForm.shipId"/>
+                v-model:param="queryForm.operName"/>
             <CusFormColumn
                 label="操作人单位:"
-                link="dept"
-                v-model:param="queryForm.shipId"/>
+                link="select"
+                v-model:param="queryForm.deptId"
+                :options="$store.state.dictionary.deptList"/>
             <CusFormColumn
                 label="操作模块:"
-                v-model:param="queryForm.shipId"
+                v-model:param="queryForm.operModule"
                 static
                 labelKey="label"
                 valueKey="value"
@@ -29,7 +30,7 @@
                 label="操作类型:"
                 link="select"
                 static
-                v-model:param="queryForm.shipId"
+                v-model:param="queryForm.operType"
                 labelKey="label"
                 valueKey="value"
                 :options="[
@@ -93,6 +94,8 @@ import {
 } from 'vue'
 import {useStore} from 'vuex'
 import {useRouter, useRoute} from 'vue-router'
+import {getOperationLogList} from "@/api/modules/oper-log";
+import {getDeptList} from "@/api/modules/dept";
 
 export default defineComponent({
   name: '',
@@ -136,6 +139,7 @@ export default defineComponent({
     const ref_cusTable = ref()
     //  获取字典
     const initDictionary = () => {
+      store.dispatch('dictionary/LOAD_DEPT')
     }
     //  查询分页参数改变处理方法
     const handlePage = ({page, pageSize}: any) => {
@@ -161,7 +165,6 @@ export default defineComponent({
         pageNum: page,
         pageSize: pageSize,
         sort: {},
-        text: ''
       }
       //  添加排序参数
       for (const [k, v] of Object.entries(state.querySort)) {
@@ -173,28 +176,16 @@ export default defineComponent({
       }
       //  添加复合查询参数
       state.loading = true
-
-      // mock
-      const arr = []
-      for (let i = 0; i < 77; i++) {
-        arr.push({p1: '阿三顶顶顶顶顶顶顶顶顶顶顶顶顶'})
-      }
-      state.queryResult.tableData = arr
-      state.queryResult.total = arr.length
-      state.loading = false
-      // that.$api.patrolBoatList(that.$util.formatGetParam(queryParams)).then((res: { code: number; rows: never[]; total: number; }) => {
-      //   if (res.code === 200) {
-      //     state.queryResult.tableData = res.rows
-      //     state.queryResult.total = res.total
-      //   }
-      //   setTimeout(() => {
-      //     state.loading = false
-      //   }, 1000)
-      // }).catch(() => {
-      //   setTimeout(() => {
-      //     state.loading = false
-      //   }, 1000)
-      // })
+      that.$api.getDeptList()
+      that.$api.getOperationLogList(queryParams).then((res: any) => {
+        if (res.code === 200) {
+          // state.queryResult.tableData = res.rows
+          // state.queryResult.total = res.total
+        }
+        state.loading = false
+      }).catch(() => {
+        state.loading = false
+      })
     }
     //  点击查询按钮后
     const onSearch = () => {