houyaf 3 jaren geleden
bovenliggende
commit
30de60d3b7

+ 0 - 1
src/App.vue

@@ -11,7 +11,6 @@ import useMenuStore from '@/store/modules/menu'
 import useTabbarStore from '@/store/modules/tabbar'
 
 const route = useRoute()
-
 const settingsStore = useSettingsStore()
 const menuStore = useMenuStore()
 const tabbarStore = useTabbarStore()

+ 11 - 32
src/router/modules/model.ts

@@ -4,10 +4,10 @@ const Layout = () => import('@/layouts/index.vue')
 
 const routes: RouteRecordRaw[] = [
   {
-    path: '/daas/model/object',
+    path: '/model/object',
     component: Layout,
-    redirect: '/daas/model/object/index',
-    name: 'daasModel',
+    redirect: '/model/object/index',
+    name: 'model',
     meta: {
       title: '对象定义',
       icon: 'ep:coin',
@@ -15,46 +15,25 @@ const routes: RouteRecordRaw[] = [
     children: [
       {
         path: 'index',
-        name: 'daasModelList',
-        component: () => import('@/views/daas/model/index.vue'),
+        name: 'modelList',
+        component: () => import('@/views/model/model/index.vue'),
         meta: {
           title: '对象定义',
           sidebar: false,
           breadcrumb: false,
-          activeMenu: '/daas/data',
+          activeMenu: '/model/object',
         },
       },
       {
-        path: 'daas/model/object/:modelId/:objectId',
-        name: 'daasObjectEdit',
-        component: () => import('@/views/daas/object/index.vue'),
+        path: 'model/object/:modelId/:objectId',
+        name: 'modelObjectEdit',
+        component: () => import('@/views/model/object/index.vue'),
         meta: {
           title: '对象编辑',
           sidebar: false,
-          activeMenu: '/daas/model/',
+          activeMenu: '/model/',
           cache: true,
-          noCache: 'daasObjectEdit',
-        },
-      },
-    ],
-  },
-  {
-    path: '/daas/model/manipulation',
-    component: Layout,
-    redirect: '/daas/model/manipulation/behavior',
-    name: 'daasManipulation',
-    meta: {
-      title: '对象操作',
-      icon: 'ic:twotone-double-arrow',
-    },
-    children: [
-      {
-        path: 'behavior',
-        name: 'daasManipulationList',
-        component: () => import('@/views/daas/manipulation/index.vue'),
-        meta: {
-          title: '对象操作',
-          sidebar: false,
+          noCache: 'modelObjectEdit',
         },
       },
     ],

+ 51 - 0
src/router/modules/rule.ts

@@ -0,0 +1,51 @@
+import type { RouteRecordRaw } from 'vue-router'
+
+const Layout = () => import('@/layouts/index.vue')
+
+const routes: RouteRecordRaw[] = [
+  {
+    path: '/rule',
+    component: Layout,
+    redirect: '/rule/index',
+    name: 'rule',
+    meta: {
+      title: '业务规则',
+      icon: 'ep:element-plus',
+    },
+    children: [
+      {
+        path: 'index',
+        name: 'ruleList',
+        component: () => import('@/views/model/model/index.vue'),
+        meta: {
+          title: '业务规则',
+          sidebar: false,
+          breadcrumb: false,
+          activeMenu: '/model/object',
+        },
+      },
+    ],
+  },
+  {
+    path: '/rule/cat',
+    component: Layout,
+    redirect: '/rule/cat/index',
+    name: 'ruleCat',
+    meta: {
+      title: '规则类别',
+      icon: 'ic:twotone-double-arrow',
+    },
+    children: [
+      {
+        path: 'index',
+        name: 'ruleCatIndex',
+        component: () => import('@/views/rule/cat/index.vue'),
+        meta: {
+          title: '规则类别',
+          sidebar: false,
+        },
+      },
+    ],
+  },
+]
+export default routes

+ 10 - 0
src/router/routes.ts

@@ -5,6 +5,7 @@ import SystemEntries from './modules/system'
 import DaaSEntries from './modules/daas'
 import PaaSEntries from './modules/paas'
 import ModelEntries from './modules/model'
+import RuleEntries from './modules/rule'
 import AppCenterEntries from '@/router/modules/app.center'
 import type { Route } from '#/global'
 import useSettingsStore from '@/store/modules/settings'
@@ -106,6 +107,15 @@ const asyncRoutes: Route.recordMainRaw[] = [
   },
   {
     meta: {
+      title: '规则',
+      icon: 'ep:element-plus',
+    },
+    children: [
+      ...RuleEntries,
+    ],
+  },
+  {
+    meta: {
       title: '数据',
       icon: 'ep:coin',
     },

+ 0 - 0
src/views/daas/manipulation/index.vue → src/views/model/manipulation/index.vue


+ 0 - 0
src/views/daas/model/components/Model.vue → src/views/model/model/components/Model.vue


+ 0 - 0
src/views/daas/model/components/Object.vue → src/views/model/model/components/Object.vue


+ 0 - 0
src/views/daas/model/index.vue → src/views/model/model/index.vue


+ 0 - 0
src/views/daas/object/index.vue → src/views/model/object/index.vue


+ 0 - 0
src/views/paas/api/components/ApiTrans.vue


+ 29 - 13
src/views/paas/api/index.vue

@@ -62,7 +62,7 @@ const getModuleData = async () => {
   })
   state.modules = [
     {
-      label: 'API模块列表',
+      label: '功能模块',
       isLeaf: false,
       modId: -1,
       children,
@@ -84,7 +84,9 @@ const onModuleAdd = () => {
 
 // 模块编辑
 const onModuleEdit = (data: { ModId: number }) => {
+  window.console.log('----------------')
   window.console.log(data)
+  window.console.log('----------------')
   const modId = data.ModId
   ModuleRef.value.showEditModule(modId)
 }
@@ -126,6 +128,10 @@ const onApiAdd = () => {
   apiRef.value.showAddApi(state.curModuleId)
 }
 
+const onApiTrans = () => {
+
+}
+
 // 编辑API
 const onApiEdit = (data: { apiId: number; modId: number }) => {
   const apiId = data.apiId
@@ -234,10 +240,25 @@ async function onChangeStatus(row: { modId: number;apiId: number; status: number
           <el-table ref="apiTableRef" v-loading="state.loading" class="list-table" :data="state.apiList" border stripe highlight-current-row height="100%">
             <el-table-column type="index" label="序号" header-align="center" align="center" width="70" />
 
-            <el-table-column prop="apiTitle" label="名称" header-align="center" align="center" width="200" />
+            <el-table-column prop="apiTitle" label="名称" header-align="center" align="center" width="200">
+              <template #default="scope">
+                <span> {{ scope.row.apiTitle }} </span>
+              </template>
+            </el-table-column>
 
-            <el-table-column prop="apiCode" label="代码" header-align="center" align="center" width="150" />
-            <el-table-column prop="status" label="status" header-align="center" align="center" width="150">
+            <el-table-column prop="apiCode" label="代码" header-align="center" align="center" width="200">
+              <template #default="scope">
+                <span> {{ scope.row.apiCode }} </span>
+              </template>
+            </el-table-column>
+
+            <el-table-column prop="apiDesc" label="说明" header-align="center" align="left">
+              <template #default="scope">
+                <span> {{ scope.row.apiDesc }} </span>
+              </template>
+            </el-table-column>
+
+            <el-table-column prop="status" label="状态" header-align="center" align="center" width="100">
               <template #default="scope">
                 <el-switch
                   v-model="scope.row.status"
@@ -252,16 +273,11 @@ async function onChangeStatus(row: { modId: number;apiId: number; status: number
               </template>
             </el-table-column>
 
-            <el-table-column prop="apiDesc" label="说明" header-align="center" align="left" />
-
-            <el-table-column label="操作" header-align="center" align="center" width="200">
+            <el-table-column label="操作" header-align="center" align="center" width="210">
               <template #default="scope">
-                <el-button type="primary" size="small" plain @click="onApiEdit(scope.row)">
-                  编辑
-                </el-button>
-                <el-button type="danger" size="small" plain @click="onApiDelete(scope.row)">
-                  删除
-                </el-button>
+                <el-button type="primary" size="small" plain @click="onApiTrans(scope.row)">事务</el-button>
+                <el-button type="warning" size="small" plain @click="onApiEdit(scope.row)">编辑</el-button>
+                <el-button type="danger" size="small" plain @click="onApiDelete(scope.row)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>

+ 0 - 0
src/views/rule/cat/index.vue


+ 0 - 0
src/views/rule/rule/index.vue