Forráskód Böngészése

移除系统管理模块及相关账号/日志接口

Co-authored-by: Cursor <cursoragent@cursor.com>
wdq 1 hónapja
szülő
commit
25195105e0

+ 0 - 1
public/config/config.js

@@ -99,7 +99,6 @@ window.AppConfig = {
       '/regions',
       '/personnel-admin',
       '/admin-batches',
-      '/system',
     ],
   },
 

+ 0 - 12
src/api/biz.ts

@@ -9,7 +9,6 @@ import type {
 import { buildDashboardByRole } from '@/utils/buildDashboard'
 import * as real from './sjnmtybt/realBiz'
 import {
-  mockAccounts,
   mockAlerts,
   mockApprovals,
   mockDeaths,
@@ -1439,17 +1438,6 @@ export function fetchReportBatches() {
   return real.fetchReportBatches()
 }
 
-/* ========== 系统管理 ========== */
-export function fetchAccounts() {
-  if (useMock()) return delay([...mockAccounts])
-  return real.fetchAccounts()
-}
-
-export function fetchOpLogs() {
-  if (useMock()) return delay([...mockLogs])
-  return real.fetchOpLogs()
-}
-
 /** —— 系统管理员运维菜单 —— */
 export function listRegionsAdmin(params?: { level?: string; parentId?: string }) {
   if (useMock()) return delay([])

+ 0 - 22
src/api/sjnmtybt/realBiz.ts

@@ -14,7 +14,6 @@ import {
   VILLAGE_WORKBENCH_TIPS,
 } from '@/utils/buildDashboard'
 import type {
-  AccountItem,
   AlertItem,
   Approval,
   DashboardData,
@@ -23,7 +22,6 @@ import type {
   DiskRecord,
   HandleAlertPayload,
   MonthlyBatch,
-  OpLog,
   Person,
   SpecialBiz,
   SubsidyStandard,
@@ -1912,23 +1910,3 @@ export async function updatePersonnelStatusAdmin(payload: {
   return { ok: true as const }
 }
 
-export async function fetchAccounts(): Promise<AccountItem[]> {
-  // 后端无账号管理接口:返回空,页面可空态展示
-  return []
-}
-
-export async function fetchOpLogs(): Promise<OpLog[]> {
-  const res = await post<PageResult<Record<string, unknown>>>('/process-logs/page', {
-    pageNum: 1,
-    pageSize: 100,
-  })
-  return (res?.list || []).map((r, idx) => ({
-    id: idx + 1,
-    time: String(r.operateTime || r.createTime || ''),
-    user: String(r.operator || ''),
-    role: String(r.operatorRole || ''),
-    module: String(r.bizType || r.module || '流程'),
-    action: String(r.action || r.opinion || ''),
-    result: String(r.result || '成功'),
-  }))
-}

+ 62 - 62
src/auto-imports.d.ts

@@ -6,73 +6,73 @@
 // biome-ignore lint: disable
 export {}
 declare global {
-  const EffectScope: typeof import('vue')['EffectScope']
-  const computed: typeof import('vue')['computed']
-  const createApp: typeof import('vue')['createApp']
-  const customRef: typeof import('vue')['customRef']
-  const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
-  const defineComponent: typeof import('vue')['defineComponent']
-  const effectScope: typeof import('vue')['effectScope']
-  const getCurrentInstance: typeof import('vue')['getCurrentInstance']
-  const getCurrentScope: typeof import('vue')['getCurrentScope']
+  const EffectScope: typeof import('vue').EffectScope
+  const computed: typeof import('vue').computed
+  const createApp: typeof import('vue').createApp
+  const customRef: typeof import('vue').customRef
+  const defineAsyncComponent: typeof import('vue').defineAsyncComponent
+  const defineComponent: typeof import('vue').defineComponent
+  const effectScope: typeof import('vue').effectScope
+  const getCurrentInstance: typeof import('vue').getCurrentInstance
+  const getCurrentScope: typeof import('vue').getCurrentScope
   const getCurrentWatcher: typeof import('vue').getCurrentWatcher
-  const h: typeof import('vue')['h']
-  const inject: typeof import('vue')['inject']
-  const isProxy: typeof import('vue')['isProxy']
-  const isReactive: typeof import('vue')['isReactive']
-  const isReadonly: typeof import('vue')['isReadonly']
-  const isRef: typeof import('vue')['isRef']
+  const h: typeof import('vue').h
+  const inject: typeof import('vue').inject
+  const isProxy: typeof import('vue').isProxy
+  const isReactive: typeof import('vue').isReactive
+  const isReadonly: typeof import('vue').isReadonly
+  const isRef: typeof import('vue').isRef
   const isShallow: typeof import('vue').isShallow
-  const markRaw: typeof import('vue')['markRaw']
-  const nextTick: typeof import('vue')['nextTick']
-  const onActivated: typeof import('vue')['onActivated']
-  const onBeforeMount: typeof import('vue')['onBeforeMount']
-  const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
-  const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
-  const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
-  const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
-  const onDeactivated: typeof import('vue')['onDeactivated']
-  const onErrorCaptured: typeof import('vue')['onErrorCaptured']
-  const onMounted: typeof import('vue')['onMounted']
-  const onRenderTracked: typeof import('vue')['onRenderTracked']
-  const onRenderTriggered: typeof import('vue')['onRenderTriggered']
-  const onScopeDispose: typeof import('vue')['onScopeDispose']
-  const onServerPrefetch: typeof import('vue')['onServerPrefetch']
-  const onUnmounted: typeof import('vue')['onUnmounted']
-  const onUpdated: typeof import('vue')['onUpdated']
-  const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
-  const provide: typeof import('vue')['provide']
-  const reactive: typeof import('vue')['reactive']
-  const readonly: typeof import('vue')['readonly']
-  const ref: typeof import('vue')['ref']
-  const resolveComponent: typeof import('vue')['resolveComponent']
-  const shallowReactive: typeof import('vue')['shallowReactive']
-  const shallowReadonly: typeof import('vue')['shallowReadonly']
-  const shallowRef: typeof import('vue')['shallowRef']
-  const toRaw: typeof import('vue')['toRaw']
-  const toRef: typeof import('vue')['toRef']
-  const toRefs: typeof import('vue')['toRefs']
-  const toValue: typeof import('vue')['toValue']
-  const triggerRef: typeof import('vue')['triggerRef']
-  const unref: typeof import('vue')['unref']
-  const useAttrs: typeof import('vue')['useAttrs']
-  const useCssModule: typeof import('vue')['useCssModule']
-  const useCssVars: typeof import('vue')['useCssVars']
-  const useId: typeof import('vue')['useId']
-  const useLink: typeof import('vue-router')['useLink']
-  const useModel: typeof import('vue')['useModel']
-  const useRoute: typeof import('vue-router')['useRoute']
-  const useRouter: typeof import('vue-router')['useRouter']
-  const useSlots: typeof import('vue')['useSlots']
-  const useTemplateRef: typeof import('vue')['useTemplateRef']
-  const watch: typeof import('vue')['watch']
-  const watchEffect: typeof import('vue')['watchEffect']
-  const watchPostEffect: typeof import('vue')['watchPostEffect']
-  const watchSyncEffect: typeof import('vue')['watchSyncEffect']
+  const markRaw: typeof import('vue').markRaw
+  const nextTick: typeof import('vue').nextTick
+  const onActivated: typeof import('vue').onActivated
+  const onBeforeMount: typeof import('vue').onBeforeMount
+  const onBeforeRouteLeave: typeof import('vue-router').onBeforeRouteLeave
+  const onBeforeRouteUpdate: typeof import('vue-router').onBeforeRouteUpdate
+  const onBeforeUnmount: typeof import('vue').onBeforeUnmount
+  const onBeforeUpdate: typeof import('vue').onBeforeUpdate
+  const onDeactivated: typeof import('vue').onDeactivated
+  const onErrorCaptured: typeof import('vue').onErrorCaptured
+  const onMounted: typeof import('vue').onMounted
+  const onRenderTracked: typeof import('vue').onRenderTracked
+  const onRenderTriggered: typeof import('vue').onRenderTriggered
+  const onScopeDispose: typeof import('vue').onScopeDispose
+  const onServerPrefetch: typeof import('vue').onServerPrefetch
+  const onUnmounted: typeof import('vue').onUnmounted
+  const onUpdated: typeof import('vue').onUpdated
+  const onWatcherCleanup: typeof import('vue').onWatcherCleanup
+  const provide: typeof import('vue').provide
+  const reactive: typeof import('vue').reactive
+  const readonly: typeof import('vue').readonly
+  const ref: typeof import('vue').ref
+  const resolveComponent: typeof import('vue').resolveComponent
+  const shallowReactive: typeof import('vue').shallowReactive
+  const shallowReadonly: typeof import('vue').shallowReadonly
+  const shallowRef: typeof import('vue').shallowRef
+  const toRaw: typeof import('vue').toRaw
+  const toRef: typeof import('vue').toRef
+  const toRefs: typeof import('vue').toRefs
+  const toValue: typeof import('vue').toValue
+  const triggerRef: typeof import('vue').triggerRef
+  const unref: typeof import('vue').unref
+  const useAttrs: typeof import('vue').useAttrs
+  const useCssModule: typeof import('vue').useCssModule
+  const useCssVars: typeof import('vue').useCssVars
+  const useId: typeof import('vue').useId
+  const useLink: typeof import('vue-router').useLink
+  const useModel: typeof import('vue').useModel
+  const useRoute: typeof import('vue-router').useRoute
+  const useRouter: typeof import('vue-router').useRouter
+  const useSlots: typeof import('vue').useSlots
+  const useTemplateRef: typeof import('vue').useTemplateRef
+  const watch: typeof import('vue').watch
+  const watchEffect: typeof import('vue').watchEffect
+  const watchPostEffect: typeof import('vue').watchPostEffect
+  const watchSyncEffect: typeof import('vue').watchSyncEffect
 }
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
+  export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, ShallowRef, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
   import('vue')
 }

+ 4 - 1
src/components.d.ts

@@ -1,8 +1,11 @@
 /* eslint-disable */
 // @ts-nocheck
+// biome-ignore lint: disable
+// oxlint-disable
+// ------
 // Generated by unplugin-vue-components
 // Read more: https://github.com/vuejs/core/pull/3399
-// biome-ignore lint: disable
+
 export {}
 
 /* prettier-ignore */

+ 0 - 1
src/constants/menus.ts

@@ -24,5 +24,4 @@ export const MENU_LIST: MenuItem[] = [
   { path: '/regions', title: '行政区划管理', icon: 'OfficeBuilding' },
   { path: '/personnel-admin', title: '人员底数管理', icon: 'UserFilled' },
   { path: '/admin-batches', title: '批次管理', icon: 'Tickets' },
-  { path: '/system', title: '系统管理', icon: 'Tools' },
 ]

+ 0 - 6
src/router/routes.ts

@@ -83,10 +83,4 @@ export const businessRoutes: RouteRecordRaw[] = [
     component: () => import('@/views/admin/AdminBatchesView.vue'),
     meta: { title: '批次管理' },
   },
-  {
-    path: 'system',
-    name: 'SystemAdmin',
-    component: () => import('@/views/system/SystemAdminView.vue'),
-    meta: { title: '系统管理' },
-  },
 ]

+ 0 - 132
src/views/system/SystemAdminView.vue

@@ -1,132 +0,0 @@
-<template>
-  <div class="system-admin-view">
-    <!-- 全局业务概览 -->
-    <StatCards :items="overviewItems" />
-
-    <!-- 账号管理 -->
-    <PagePanel title="账号管理">
-      <el-table v-loading="accountLoading" :data="pagedAccounts" border stripe size="small">
-        <el-table-column prop="username" label="登录账号" width="140" />
-        <el-table-column prop="name" label="姓名" width="100" />
-        <el-table-column label="角色" width="140">
-          <template #default="{ row }">{{ roleLabel(row.roleKey) }}</template>
-        </el-table-column>
-        <el-table-column prop="org" label="所属机构" min-width="180" show-overflow-tooltip />
-        <el-table-column label="状态" width="88" align="center">
-          <template #default="{ row }">
-            <StatusTag :status="row.status" />
-          </template>
-        </el-table-column>
-        <el-table-column prop="lastLogin" label="最近登录" width="140" />
-        <el-table-column label="操作" width="100" align="center" fixed="right">
-          <template #default>
-            <el-button link type="primary" size="small" @click="onEditAccount">编辑</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <TablePagination
-        v-model:page="accountPage"
-        v-model:page-size="accountPageSize"
-        :total="accountTotal"
-      />
-    </PagePanel>
-
-    <!-- 操作日志 -->
-    <PagePanel title="操作日志">
-      <el-table v-loading="logLoading" :data="pagedLogs" border stripe size="small">
-        <el-table-column prop="time" label="操作时间" width="140" />
-        <el-table-column prop="user" label="操作人" width="100" />
-        <el-table-column prop="role" label="角色" width="140" />
-        <el-table-column prop="module" label="模块" width="120" />
-        <el-table-column prop="action" label="操作内容" min-width="180" show-overflow-tooltip />
-        <el-table-column label="结果" width="80" align="center">
-          <template #default="{ row }">
-            <StatusTag :status="row.result" />
-          </template>
-        </el-table-column>
-      </el-table>
-      <TablePagination
-        v-model:page="logPage"
-        v-model:page-size="logPageSize"
-        :total="logTotal"
-      />
-    </PagePanel>
-  </div>
-</template>
-
-<script setup lang="ts">
-import { computed, onMounted, ref } from 'vue'
-import { ElMessage } from 'element-plus'
-import StatCards from '@/components/common/StatCards.vue'
-import PagePanel from '@/components/common/PagePanel.vue'
-import StatusTag from '@/components/common/StatusTag.vue'
-import TablePagination from '@/components/common/TablePagination.vue'
-import { fetchAccounts, fetchOpLogs } from '@/api/biz'
-import { useClientPagination } from '@/composables/useClientPagination'
-import { useUserStore } from '@/stores/user'
-import type { AccountItem, OpLog } from '@/types/biz'
-
-const userStore = useUserStore()
-const accounts = ref<AccountItem[]>([])
-const logs = ref<OpLog[]>([])
-const accountLoading = ref(false)
-const logLoading = ref(false)
-
-const {
-  page: accountPage,
-  pageSize: accountPageSize,
-  total: accountTotal,
-  pagedList: pagedAccounts,
-  resetPage: resetAccountPage,
-} = useClientPagination(accounts)
-
-const {
-  page: logPage,
-  pageSize: logPageSize,
-  total: logTotal,
-  pagedList: pagedLogs,
-  resetPage: resetLogPage,
-} = useClientPagination(logs)
-
-/** 全局业务概览(无数据为 0,不造假) */
-const overviewItems = computed(() => [
-  { label: '系统账号', value: accounts.value.length, unit: '个' },
-  { label: '启用账号', value: accounts.value.filter((a) => a.status === '启用').length, unit: '个' },
-  { label: '今日操作', value: logs.value.length, unit: '次' },
-  { label: '角色类型', value: userStore.roles.length, unit: '种' },
-])
-
-/** 角色 key → 显示名称 */
-function roleLabel(roleKey: string) {
-  return userStore.roles.find((r) => r.key === roleKey)?.label ?? roleKey
-}
-
-function onEditAccount() {
-  ElMessage.info('账号编辑接口尚未对接')
-}
-
-async function loadAccounts() {
-  accountLoading.value = true
-  try {
-    accounts.value = await fetchAccounts()
-    resetAccountPage()
-  } finally {
-    accountLoading.value = false
-  }
-}
-
-async function loadLogs() {
-  logLoading.value = true
-  try {
-    logs.value = await fetchOpLogs()
-    resetLogPage()
-  } finally {
-    logLoading.value = false
-  }
-}
-
-onMounted(() => {
-  loadAccounts()
-  loadLogs()
-})
-</script>