zs 6 月之前
父节点
当前提交
99a402a832

+ 1 - 1
src/components/custom/custom-table.vue

@@ -16,7 +16,7 @@
             <slot v-bind="{ row }">
               <template v-for="f in opera">
                 <template v-if="display(f, row)">
-                  <el-link :key="f.method" :type="f.type || 'primary'" size="small" :underline="false" class="link" v-method="f.method" @click="handleOpera(f, row, $index)">
+                  <el-link :key="f.method" :type="f.type || 'primary'"  :underline="false" class="link" v-method="f.method" @click="handleOpera(f, row, $index)">
                     {{ f.label }}
                   </el-link>
                 </template>

+ 1 - 6
src/router/index.js

@@ -54,12 +54,7 @@ export const constantRoutes = [
       {
         path: '/acccount',
         name: 'acccount',
-        meta: {
-          title: '账号管理',
-          affix: true,
-          keepAlive: true,
-          alwaysShow: false
-        },
+        meta: { title: '修改密码' },
         component: () => import('@/views/account/index.vue')
       }
     ]

+ 4 - 16
src/router/modules/system.js

@@ -4,20 +4,14 @@ export const routes = [
     name: 'system',
     redirect: 'noredirect',
     meta: {
-      title: '系统设置',
-      affix: true,
-      keepAlive: true,
-      alwaysShow: false
+      title: '系统设置'
     },
     children: [
       {
         path: '/system/menus',
         name: 'system_menus',
         meta: {
-          title: '目录设置',
-          affix: true,
-          keepAlive: true,
-          alwaysShow: false
+          title: '目录设置'
         },
         component: () => import('@/views/system/menus/index.vue')
       },
@@ -25,10 +19,7 @@ export const routes = [
         path: '/system/role',
         name: 'system_role',
         meta: {
-          title: '角色管理',
-          affix: true,
-          keepAlive: true,
-          alwaysShow: false
+          title: '角色管理'
         },
         component: () => import('@/views/system/role/index.vue')
       },
@@ -36,10 +27,7 @@ export const routes = [
         path: '/system/dict',
         name: 'system_dict',
         meta: {
-          title: '字典管理',
-          affix: true,
-          keepAlive: true,
-          alwaysShow: false
+          title: '字典管理'
         },
         component: () => import('@/views/system/dict/index.vue')
       }

+ 2 - 8
src/router/modules/user.js

@@ -4,20 +4,14 @@ export const routes = [
     name: 'user',
     redirect: 'noredirect',
     meta: {
-      title: '用户管理',
-      affix: true,
-      keepAlive: true,
-      alwaysShow: false
+      title: '用户管理'
     },
     children: [
       {
         path: '/user/admin',
         name: 'user_admin',
         meta: {
-          title: '管理员用户',
-          affix: true,
-          keepAlive: true,
-          alwaysShow: false
+          title: '管理员用户'
         },
         component: () => import('@/views/user/admin/index.vue')
       }

+ 4 - 6
src/views/system/dict/index.vue

@@ -1,10 +1,8 @@
 <template>
   <div class="main animate__animated animate__backInRight" v-loading="loading">
-    <custom-search-bar :fields="fields.filter((f) => f.isSearch)" v-model="searchForm" @search="search"
-      @reset="toReset"></custom-search-bar>
+    <custom-search-bar :fields="fields.filter((f) => f.isSearch)" v-model="searchForm" @search="search" @reset="toReset"></custom-search-bar>
     <custom-button-bar :fields="buttonFields" @add="toAdd"></custom-button-bar>
-    <custom-table :data="data" :fields="fields" @query="search" :total="total" :opera="opera" @dict="toDict"
-      @edit="toEdit" @delete="toDelete">
+    <custom-table :data="data" :fields="fields" @query="search" :total="total" :opera="opera" @dict="toDict" @edit="toEdit" @delete="toDelete">
       <template #is_use="{ row }">
         <el-tag v-if="row.is_use == '0'" type="success">启用</el-tag>
         <el-tag v-else type="info">禁用</el-tag>
@@ -76,7 +74,7 @@ onMounted(async () => {
 
 const searchOther = async () => {
   const result = await dictDataStore.query({ code: 'isUse', is_use: '0' })
-  if ($checkRes(result)) isUseList.value = result.data
+  if ($checkRes(result)) isUseList.value = result.data.data
 }
 const search = async (query = { skip: 0, limit }) => {
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value }
@@ -103,7 +101,7 @@ const toDict = (data) => {
 // 修改
 const toEdit = (data) => {
   form.value = data
-  dialog.value = { type: '1', show: true, title:'修改字典类型', top: '15vh' }
+  dialog.value = { type: '1', show: true, title: '修改字典类型', top: '15vh' }
 }
 // 删除
 const toDelete = async (data) => {

+ 5 - 8
src/views/system/dictData/index.vue

@@ -1,17 +1,14 @@
 <template>
   <div class="main animate__animated animate__backInRight" v-loading="loading">
-    <custom-search-bar :fields="fields.filter((f) => f.isSearch)" v-model="searchForm" @search="search"
-      @reset="toReset"></custom-search-bar>
+    <custom-search-bar :fields="fields.filter((f) => f.isSearch)" v-model="searchForm" @search="search" @reset="toReset"></custom-search-bar>
     <custom-button-bar :fields="buttonFields" @add="toAdd"></custom-button-bar>
-    <custom-table :data="data" :fields="fields" @query="search" :total="total" :opera="opera" @edit="toEdit"
-      @delete="toDelete">
+    <custom-table :data="data" :fields="fields" @query="search" :total="total" :opera="opera" @edit="toEdit" @delete="toDelete">
       <template #is_use="{ row }">
         <el-tag v-if="row.is_use == '0'" type="success">启用</el-tag>
         <el-tag v-else type="info">禁用</el-tag>
       </template>
     </custom-table>
-    <el-dialog v-model="dialog" :title="$t('pages.dictData.dialogTitle')" :destroy-on-close="false" @close="toClose"
-      width="30%">
+    <el-dialog v-model="dialog" :title="$t('pages.dictData.dialogTitle')" :destroy-on-close="false" @close="toClose" width="30%">
       <custom-form v-model="form" :fields="formFields" :rules="rules" @save="toSave">
         <template #is_use>
           <el-radio v-for="i in isUseList" :key="i._id" :label="i.value">{{ i.label }}</el-radio>
@@ -70,8 +67,8 @@ const search = async (query = { skip: 0, limit }) => {
   const info = { skip: query.skip, limit: query.limit, ...searchForm.value, code: codeInfo.value.code }
   const res = await store.query(info)
   if (res.errcode == '0') {
-    data.value = res.data
-    total.value = res.total
+    data.value = res.data.data
+    total.value = res.data.total
   }
 }
 // 字典数据转换

+ 1 - 1
src/views/system/menus/index.vue

@@ -2,7 +2,7 @@
   <div class="main animate__animated animate__backInRight">
     <el-row>
       <el-col :span="24" style="text-align: right; padding: 10px">
-        <el-button type="primary" size="small" @click="toAdd()">{{ $t('common.add') }}</el-button>
+        <el-button type="primary" @click="toAdd()">{{ $t('common.add') }}</el-button>
       </el-col>
       <el-col :span="24">
         <menu-table></menu-table>

+ 1 - 1
src/views/system/menus/parts/menu-info.vue

@@ -11,7 +11,7 @@
   </el-tabs>
   <el-row type="flex" justify="space-around" style="margin-top: 10px">
     <el-col :span="6" style="text-align: center">
-      <el-button @click="toSave" size="small" type="primary">{{ $t('common.save') }}</el-button>
+      <el-button @click="toSave" type="primary">{{ $t('common.save') }}</el-button>
     </el-col>
   </el-row>
 </template>

+ 3 - 5
src/views/system/role/index.vue

@@ -13,7 +13,7 @@
     <el-row justify="end" style="margin-top: 10px; height: 5vh">
       <el-pagination background layout="total, prev, pager, next" :page-size="limit" :total="total" v-model:current-page="currentPage" @current-change="changePage" />
     </el-row>
-    <el-dialog v-model="dialog" :title="$t('pages.role.dialogTitle')" :destroy-on-close="true" @close="toClose">
+    <el-dialog v-model="dialog" title="角色信息" :destroy-on-close="true" @close="toClose">
       <role-form></role-form>
     </el-dialog>
   </div>
@@ -38,9 +38,7 @@ onMounted(() => {
 const menuList = ref([])
 const searchMenus = async () => {
   const res = await menuStore.query()
-  if ($checkRes(res)) {
-    menuList.value = res.data
-  }
+  if ($checkRes(res)) menuList.value = res.data
 }
 
 const data = ref([])
@@ -61,7 +59,7 @@ const dialog = ref(false)
 const toEdit = async (data) => {
   let res = await store.fetch(data._id)
   if ($checkRes(res)) {
-    form.value = res.data.data
+    form.value = res.data
     dialog.value = true
   }
 }

+ 2 - 5
src/views/user/admin/index.vue

@@ -1,10 +1,8 @@
 <template>
   <div class="main animate__animated animate__backInRight">
-    <custom-search-bar v-model="searchForm" :fields="fields.filter((f) => f.filter)" @search="search"
-      @reset="toReset"></custom-search-bar>
+    <custom-search-bar v-model="searchForm" :fields="fields.filter((f) => f.filter)" @search="search" @reset="toReset"></custom-search-bar>
     <custom-button-bar :fields="buttonFields" @add="toAdd"></custom-button-bar>
-    <custom-table :data="data" :fields="fields" @search="search" :total="total" :opera="opera" @edit="toEdit"
-      @changeUse="toChangeUse" @delete="toDelete" @rp="toResetPwd">
+    <custom-table :data="data" :fields="fields" @search="search" :total="total" :opera="opera" @edit="toEdit" @changeUse="toChangeUse" @delete="toDelete" @rp="toResetPwd">
       <template #is_use="{ row }">
         <el-tag v-if="row.is_use == '0'" type="success">启用</el-tag>
         <el-tag v-else type="info">禁用</el-tag>
@@ -98,7 +96,6 @@ const searchOther = async () => {
     roleList.value = roleResult.data.data
   }
 }
-
 const toDelete = async (data) => {
   const res = await store.del(data._id)
   if ($checkRes(res, true)) {