houyaf 3 лет назад
Родитель
Сommit
ed3c39b944

+ 6 - 6
src/api/api/apiApi.ts

@@ -31,9 +31,9 @@ export function getApiByList(data: any) {
  * @param apiId
  * @param apiId
  * @returns
  * @returns
  */
  */
-export function getApiById(moduleId: number, apiId: number) {
+export function getApiById(apiId: number) {
   return apiRequest({
   return apiRequest({
-    url: `/api/${moduleId}/${apiId}`,
+    url: `/api/${apiId}`,
     method: 'GET',
     method: 'GET',
   })
   })
 }
 }
@@ -70,9 +70,9 @@ export function updateApi(data: any) {
  * @param status
  * @param status
  * @returns
  * @returns
  */
  */
-export function updateApiStatus(moduleId: number, apiId: number, status: number) {
+export function updateApiStatus(apiId: number, status: number) {
   return apiRequest({
   return apiRequest({
-    url: `/api/updateStatus/${moduleId}/${apiId}/${status}`,
+    url: `/api/updateStatus/${apiId}/${status}`,
     method: 'PUT',
     method: 'PUT',
   })
   })
 }
 }
@@ -82,9 +82,9 @@ export function updateApiStatus(moduleId: number, apiId: number, status: number)
  * @param apiId
  * @param apiId
  * @returns
  * @returns
  */
  */
-export function deleteApiById(moduleId: number, apiId: number) {
+export function deleteApiById(apiId: number) {
   return apiRequest({
   return apiRequest({
-    url: `/api/${moduleId}/${apiId}`,
+    url: `/api/${apiId}`,
     method: 'DELETE',
     method: 'DELETE',
   })
   })
 }
 }

+ 1 - 1
src/router/modules/api.ts

@@ -25,7 +25,7 @@ const routes: RouteRecordRaw[] = [
         },
         },
       },
       },
       {
       {
-        path: 'trans/:moduleId/:apiId',
+        path: 'trans/:apiId',
         name: 'apiTrans',
         name: 'apiTrans',
         component: () => import('@/views/api/trans/index.vue'),
         component: () => import('@/views/api/trans/index.vue'),
         meta: {
         meta: {

+ 12 - 9
src/views/api/api/components/Api.vue

@@ -13,7 +13,8 @@ const state = reactive({
   dialogVisible: false,
   dialogVisible: false,
   loading: false,
   loading: false,
   formData: {
   formData: {
-    modId: 0,
+    bizId: 0,
+    objectId: 0,
     apiId: -1,
     apiId: -1,
     apiTitle: '',
     apiTitle: '',
     apiType: 1,
     apiType: 1,
@@ -35,9 +36,9 @@ const formRules = ref<FormRules>({
   ],
   ],
 })
 })
 
 
-const getData = async (modId: number, apiId: number) => {
+const getData = async (apiId: number) => {
   state.loading = true
   state.loading = true
-  const { data } = await getApiById(modId, apiId)
+  const { data } = await getApiById(apiId)
   state.formData = data
   state.formData = data
   state.loading = false
   state.loading = false
 }
 }
@@ -65,7 +66,8 @@ const onCancel = () => {
 
 
 function resetFormData() {
 function resetFormData() {
   state.formData = {
   state.formData = {
-    modId: 0,
+    bizId: 0,
+    objectId: 0,
     apiId: -1,
     apiId: -1,
     apiType: 1,
     apiType: 1,
     apiTitle: '',
     apiTitle: '',
@@ -77,20 +79,21 @@ function resetFormData() {
 }
 }
 
 
 defineExpose({
 defineExpose({
-  showAddApi(modId: number) {
+  showAddApi(bizId: number, objectId: number) {
     resetFormData()
     resetFormData()
     state.title = '新增API'
     state.title = '新增API'
     state.actionType = 1
     state.actionType = 1
-    state.formData.modId = modId
+    state.formData.bizId = bizId
+    state.formData.objectId = objectId
     state.dialogVisible = true
     state.dialogVisible = true
   },
   },
-  showEditApi(modId: number, apiId: any) {
+  showEditApi(apiId: any) {
     resetFormData()
     resetFormData()
     state.title = '编辑API'
     state.title = '编辑API'
-    state.formData.modId = modId
+    state.formData.apiId = apiId
     state.actionType = 2
     state.actionType = 2
     state.dialogVisible = true
     state.dialogVisible = true
-    getData(modId, apiId)
+    getData(apiId)
   },
   },
 
 
 })
 })

+ 0 - 124
src/views/api/api/components/Module.vue

@@ -1,124 +0,0 @@
-<route lang="yaml">
-meta:
-  enabled: false
-</route>
-
-<script lang="ts" setup>
-import type { FormInstance, FormRules } from 'element-plus'
-import { createModule, getModuleById, updateModule } from '@/api/api/apiModuleApi'
-const emit = defineEmits(['success'])
-
-const formRef = ref<FormInstance>()
-const formRules = ref<FormRules>({
-  moduleTitle: [
-    { required: true, message: '请输入模块名称', trigger: 'blur' },
-  ],
-  moduleCode: [
-    { required: true, message: '请输入模块代码', trigger: 'blur' },
-  ],
-  moduleDesc: [
-    { required: false, message: '请输入描述', trigger: 'blur' },
-  ],
-})
-
-const state = reactive({
-  title: '',
-  dialogVisible: false,
-  loading: false,
-  formData: {
-    moduleId: 1,
-    moduleTitle: '',
-    moduleCode: '',
-    moduleDesc: '',
-    isFixed: 0,
-  },
-  actionType: 1,
-})
-
-onMounted(() => {})
-
-const getData = async (moduleId: number) => {
-  state.loading = true
-  const { data } = await getModuleById(moduleId)
-  state.formData = data
-  state.loading = false
-}
-
-const onSubmit = () => {
-  formRef.value && formRef.value.validate(async (valid) => {
-    if (valid) {
-      if (state.actionType === 1) {
-        await createModule(state.formData)
-        state.dialogVisible = false
-        emit('success')
-      }
-      else {
-        await updateModule(state.formData)
-        state.dialogVisible = false
-        emit('success')
-      }
-    }
-  })
-}
-
-function onCancel() {
-  state.dialogVisible = false
-}
-
-function resetFormData() {
-  state.formData = {
-    moduleId: -1,
-    moduleCode: '',
-    moduleTitle: '',
-    moduleDesc: '',
-    isFixed: 0,
-  }
-}
-
-defineExpose({
-  showAddModule() {
-    resetFormData()
-    state.title = '新增模块'
-    state.actionType = 1
-    state.dialogVisible = true
-  },
-  showEditModule(moduleId: number) {
-    resetFormData()
-    state.title = '编辑模块'
-    state.actionType = 2
-    state.dialogVisible = true
-    getData(moduleId)
-  },
-})
-</script>
-
-<template>
-  <div>
-    <el-dialog v-model="state.dialogVisible" :title="state.title" width="600px" :close-on-click-modal="false" append-to-body destroy-on-close>
-      <div v-loading="state.loading">
-        <el-form ref="formRef" :model="state.formData" :rules="formRules" label-width="120px" label-suffix=":">
-          <el-form-item label="模块名称" prop="moduleTitle">
-            <el-input v-model="state.formData.moduleTitle" placeholder="请输入模块名称" />
-          </el-form-item>
-
-          <el-form-item label="模块代码" prop="moduleCode">
-            <el-input v-model="state.formData.moduleCode" placeholder="请输入模块代码" />
-          </el-form-item>
-
-          <el-form-item label="简要说明" prop="moduleDesc">
-            <el-input v-model="state.formData.moduleDesc" type="textarea" rows="10" placeholder="请输入简要说明" />
-          </el-form-item>
-        </el-form>
-      </div>
-
-      <template #footer>
-        <el-button size="large" @click="onCancel">
-          取消
-        </el-button>
-        <el-button type="primary" size="large" @click="onSubmit">
-          保存
-        </el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>

+ 39 - 89
src/views/api/api/index.vue

@@ -5,10 +5,9 @@ meta:
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { ElMessage, ElMessageBox } from 'element-plus'
-import PSModule from './components/Module.vue'
 import PSApi from './components/Api.vue'
 import PSApi from './components/Api.vue'
+import { getBizData } from '@/api/biz/bizApi'
 import { deleteApiById, getApiByList, updateApiStatus } from '@/api/api/apiApi'
 import { deleteApiById, getApiByList, updateApiStatus } from '@/api/api/apiApi'
-import { deleteModuleById, getModuleByList } from '@/api/api/apiModuleApi'
 import useSettingsStore from '@/store/modules/settings'
 import useSettingsStore from '@/store/modules/settings'
 import { apiType } from '@/utils/tool'
 import { apiType } from '@/utils/tool'
 
 
@@ -19,12 +18,16 @@ const tabbar = useTabbar()
 interface TreeNode {
 interface TreeNode {
   label: string
   label: string
   isLeaf: boolean
   isLeaf: boolean
-  moduleId: number
+  value: number
+  bizId: number
+  objectId: number
   children?: TreeNode[]
   children?: TreeNode[]
 }
 }
 
 
 interface Api {
 interface Api {
-  moduleId: number
+  bizId: number
+  objectId: number
+  oamId: number
   apiId: number
   apiId: number
   apiType: number
   apiType: number
   apiTitle: string
   apiTitle: string
@@ -37,8 +40,9 @@ interface Api {
 const state = reactive({
 const state = reactive({
   loading: false,
   loading: false,
   keywords: '',
   keywords: '',
-  modules: [] as TreeNode[],
-  curModuleId: 0,
+  treeData: [] as TreeNode[],
+  curBizId: 0,
+  curObjectId: 0,
   apiList: [] as Api[],
   apiList: [] as Api[],
   dialogState: 1,
   dialogState: 1,
   search: {
   search: {
@@ -49,74 +53,49 @@ const state = reactive({
 const leftTreeRef = ref()
 const leftTreeRef = ref()
 const ModuleRef = ref()
 const ModuleRef = ref()
 const getApiData = async () => {
 const getApiData = async () => {
-  const curModuleId = state.curModuleId
-  if (curModuleId > 0) {
+  const curBizId = state.curBizId
+  const curObjectId = state.curObjectId
+  if (curBizId > 0 && curObjectId > 0) {
     state.loading = true
     state.loading = true
-    const { data } = await getApiByList({ moduleId: curModuleId })
+    const { data } = await getApiByList({ bizId: curBizId, objectId: curObjectId })
     state.apiList = data
     state.apiList = data
     state.loading = false
     state.loading = false
   }
   }
 }
 }
 
 
-const getModuleData = async () => {
-  const { data } = await getModuleByList('')
-  const children: TreeNode[] = []
-  data.forEach((item: any) => {
-    return children.push({
-      label: item.moduleTitle,
-      moduleId: item.moduleId,
-      isLeaf: true,
-    })
-  })
-  state.modules = [
-    {
-      label: '功能模块',
-      isLeaf: false,
-      moduleId: -1,
-      children,
-    },
-  ]
+const getData = async () => {
+  const { data } = await getBizData()
+  state.treeData = data
 
 
   if (data && data.length > 0) {
   if (data && data.length > 0) {
-    state.curModuleId = data[0].moduleId
+    state.curBizId = data[0].bizId
+
+    data.forEach((biz: { label: string; bizTitle: string; objects: any; children: any; isLeaf: boolean }) => {
+      biz.label = biz.bizTitle
+      biz.isLeaf = false
+      const objects = biz.objects
+      objects.forEach((object: { label: string; objectTitle: string; isLeaf: boolean }) => {
+        object.label = object.objectTitle
+        object.isLeaf = true
+      })
+      biz.children = objects
+    })
 
 
     await getApiData()
     await getApiData()
     await nextTick(() => {
     await nextTick(() => {
-      leftTreeRef.value.setCurrentKey(data[0].moduleId)
+      leftTreeRef.value.setCurrentKey(data[0].bizId)
     })
     })
   }
   }
 }
 }
-// 模块新增
-const onModuleAdd = () => {
-  ModuleRef.value.showAddModule()
-}
-
-// 模块编辑
-const onModuleEdit = (data: { moduleId: number }) => {
-  const moduleId = data.moduleId
-  ModuleRef.value.showEditModule(moduleId)
-}
-
-// 模块删除
-const onModuleDelete = (data: any) => {
-  ElMessageBox.confirm(`确认删除「${data.moduleTitle}」吗?`, '确认信息').then(async () => {
-    await deleteModuleById(data.moduleId)
-    await getModuleData()
-    ElMessage.success({
-      message: '删除成功',
-      center: true,
-    })
-  })
-}
 
 
 onMounted(() => {
 onMounted(() => {
-  getModuleData()
+  getData()
 })
 })
 
 
 // 模块选择
 // 模块选择
 const onTreeNodeClick = (node: TreeNode) => {
 const onTreeNodeClick = (node: TreeNode) => {
   if (node.isLeaf) {
   if (node.isLeaf) {
-    state.curModuleId = node.moduleId
+    state.curObjectId = node.objectId
     getApiData()
     getApiData()
   }
   }
 }
 }
@@ -131,7 +110,7 @@ const onSearch = () => {
 
 
 // 新增API
 // 新增API
 const onApiAdd = () => {
 const onApiAdd = () => {
-  apiRef.value.showAddApi(state.curModuleId)
+  apiRef.value.showAddApi(state.curBizId, state.curObjectId)
 }
 }
 
 
 // 编辑API
 // 编辑API
@@ -155,12 +134,11 @@ const onApiDelete = (row: any) => {
 }
 }
 
 
 // 编辑对象
 // 编辑对象
-const onApiTrans = (row: { moduleId: number; apiId: number }) => {
+const onApiTrans = (row: { apiId: number }) => {
   if (settingsStore.settings.tabbar.enable && settingsStore.settings.tabbar.mergeTabsBy !== 'activeMenu') {
   if (settingsStore.settings.tabbar.enable && settingsStore.settings.tabbar.mergeTabsBy !== 'activeMenu') {
     tabbar.open({
     tabbar.open({
       name: 'apiTrans',
       name: 'apiTrans',
       params: {
       params: {
-        moduleId: row.moduleId,
         apiId: row.apiId,
         apiId: row.apiId,
       },
       },
     })
     })
@@ -169,15 +147,14 @@ const onApiTrans = (row: { moduleId: number; apiId: number }) => {
     router.push({
     router.push({
       name: 'apiTrans',
       name: 'apiTrans',
       params: {
       params: {
-        moduleId: row.moduleId,
         apiId: row.apiId,
         apiId: row.apiId,
       },
       },
     })
     })
   }
   }
 }
 }
 
 
-async function onChangeStatus(row: { moduleId: number; apiId: number; status: number }) {
-  const res = await updateApiStatus(row.moduleId, row.apiId, row.status)
+async function onChangeStatus(row: { apiId: number; status: number }) {
+  const res = await updateApiStatus(row.apiId, row.status)
   ElMessage.success({
   ElMessage.success({
     message: res.msg,
     message: res.msg,
     center: true,
     center: true,
@@ -189,14 +166,6 @@ async function onChangeStatus(row: { moduleId: number; apiId: number; status: nu
   <div class="absolute-container">
   <div class="absolute-container">
     <tool-header title="API管理">
     <tool-header title="API管理">
       <template #right>
       <template #right>
-        <el-button type="primary" plain @click="onModuleAdd">
-          <template #icon>
-            <el-icon>
-              <svg-icon name="i-ep:plus" />
-            </el-icon>
-          </template>
-          新增模块
-        </el-button>
       </template>
       </template>
     </tool-header>
     </tool-header>
 
 
@@ -204,7 +173,7 @@ async function onChangeStatus(row: { moduleId: number; apiId: number; status: nu
       <LayoutContainer left-side-width="250px" hide-left-side-toggle>
       <LayoutContainer left-side-width="250px" hide-left-side-toggle>
         <template #leftSide>
         <template #leftSide>
           <el-scrollbar class="tree">
           <el-scrollbar class="tree">
-            <ElTree ref="leftTreeRef" :data="state.modules" default-expand-all node-key="moduleId" @node-click="onTreeNodeClick">
+            <ElTree ref="leftTreeRef" :data="state.treeData" default-expand-all node-key="moduleId" @node-click="onTreeNodeClick">
               <template #default="{ node, data }">
               <template #default="{ node, data }">
                 <div class="custom-tree-node">
                 <div class="custom-tree-node">
                   <div class="label" :title="node.label">
                   <div class="label" :title="node.label">
@@ -215,24 +184,6 @@ async function onChangeStatus(row: { moduleId: number; apiId: number; status: nu
                       {{ data.label }}
                       {{ data.label }}
                     </div>
                     </div>
                   </div>
                   </div>
-                  <div v-if="data.isLeaf" class="actions">
-                    <el-button-group>
-                      <el-button type="info" plain size="small" @click.stop="onModuleEdit(data)">
-                        <template #icon>
-                          <el-icon>
-                            <svg-icon name="i-ep:edit" />
-                          </el-icon>
-                        </template>
-                      </el-button>
-                      <el-button type="danger" plain size="small" @click.stop="onModuleDelete(data)">
-                        <template #icon>
-                          <el-icon>
-                            <svg-icon name="i-ep:delete" />
-                          </el-icon>
-                        </template>
-                      </el-button>
-                    </el-button-group>
-                  </div>
                 </div>
                 </div>
               </template>
               </template>
             </ElTree>
             </ElTree>
@@ -265,7 +216,7 @@ async function onChangeStatus(row: { moduleId: number; apiId: number; status: nu
           <el-table ref="apiTableRef" v-loading="state.loading" class="list-table" :data="state.apiList" border stripe highlight-current-row height="100%">
           <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 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="150">
               <template #default="scope">
               <template #default="scope">
                 <span> {{ scope.row.apiTitle }} </span>
                 <span> {{ scope.row.apiTitle }} </span>
               </template>
               </template>
@@ -277,7 +228,7 @@ async function onChangeStatus(row: { moduleId: number; apiId: number; status: nu
               </template>
               </template>
             </el-table-column>
             </el-table-column>
 
 
-            <el-table-column prop="apiCode" label="代码" header-align="left" align="left" width="200">
+            <el-table-column prop="apiCode" label="代码" header-align="left" align="left" width="120">
               <template #default="scope">
               <template #default="scope">
                 <span> {{ scope.row.apiCode }} </span>
                 <span> {{ scope.row.apiCode }} </span>
               </template>
               </template>
@@ -315,7 +266,6 @@ async function onChangeStatus(row: { moduleId: number; apiId: number; status: nu
         </div>
         </div>
       </LayoutContainer>
       </LayoutContainer>
     </div>
     </div>
-    <PSModule ref="ModuleRef" @success="getModuleData" />
     <PSApi ref="apiRef" @success="getApiData" />
     <PSApi ref="apiRef" @success="getApiData" />
   </div>
   </div>
 </template>
 </template>

+ 1 - 3
src/views/api/trans/components/ObjectOAMSelector.vue

@@ -39,7 +39,6 @@ const state = reactive({
     keywords: '',
     keywords: '',
   },
   },
   formData: {
   formData: {
-    moduleId: 0,
     apiId: 0,
     apiId: 0,
     bizId: 0,
     bizId: 0,
     objectId: 0,
     objectId: 0,
@@ -128,9 +127,8 @@ const onCancel = () => {
 
 
 // 点击选择
 // 点击选择
 defineExpose({
 defineExpose({
-  showModel(moduleId: number, apiId: number) {
+  showModel(apiId: number) {
     state.search.apiId = apiId
     state.search.apiId = apiId
-    state.formData.moduleId = moduleId
     state.formData.apiId = apiId
     state.formData.apiId = apiId
     dialogVisible.value = true
     dialogVisible.value = true
   },
   },

+ 2 - 4
src/views/api/trans/index.vue

@@ -17,7 +17,6 @@ const route = useRoute()
 const router = useRouter()
 const router = useRouter()
 const tabbar = useTabbar()
 const tabbar = useTabbar()
 
 
-const moduleId = parseInt(route.params.moduleId.toString())
 const apiId = parseInt(route.params.apiId.toString())
 const apiId = parseInt(route.params.apiId.toString())
 
 
 interface TreeNode {
 interface TreeNode {
@@ -35,7 +34,6 @@ const state = reactive({
   dialogState: 1,
   dialogState: 1,
   treeData: [] as TreeNode[],
   treeData: [] as TreeNode[],
   search: {
   search: {
-    moduleId,
     apiId,
     apiId,
     keywords: '',
     keywords: '',
   },
   },
@@ -48,7 +46,7 @@ const ObjectSelectorRef = ref()
 // 查询数据
 // 查询数据
 const getData = async () => {
 const getData = async () => {
   state.loading = true
   state.loading = true
-  const { data } = await getApiById(moduleId, apiId)
+  const { data } = await getApiById(apiId)
   state.apiTitle = data.apiTitle
   state.apiTitle = data.apiTitle
   state.apiCode = data.apiCode
   state.apiCode = data.apiCode
   state.apiType = data.apiType
   state.apiType = data.apiType
@@ -82,7 +80,7 @@ onMounted(() => {
 const formRef = ref<FormInstance>()
 const formRef = ref<FormInstance>()
 
 
 const AddObjectOAM = () => {
 const AddObjectOAM = () => {
-  ObjectSelectorRef.value.showModel(moduleId, apiId)
+  ObjectSelectorRef.value.showModel(apiId)
 }
 }
 
 
 const onGenerateParams = async () => {
 const onGenerateParams = async () => {

+ 2 - 2
src/views/biz/oam/index.vue

@@ -42,6 +42,7 @@ interface ObjectOAM {
   sqlFrom: string
   sqlFrom: string
   sqlWhere: string
   sqlWhere: string
   sqlOrder: string
   sqlOrder: string
+  sqlCount: string
 }
 }
 
 
 const state = reactive({
 const state = reactive({
@@ -118,8 +119,6 @@ onMounted(() => {
   getOAMTree()
   getOAMTree()
 })
 })
 
 
-const formRef = ref<FormInstance>()
-
 // Object OAM选择
 // Object OAM选择
 const onTreeNodeClick = (node: TreeNode) => {
 const onTreeNodeClick = (node: TreeNode) => {
   if (node.isLeaf) {
   if (node.isLeaf) {
@@ -222,6 +221,7 @@ function goBack() {
                 <li><span>Select</span><br>{{ state.oam.sqlSelect }}</li>
                 <li><span>Select</span><br>{{ state.oam.sqlSelect }}</li>
                 <li><span>From </span><br>{{ state.oam.sqlFrom }}</li>
                 <li><span>From </span><br>{{ state.oam.sqlFrom }}</li>
                 <li><span>Where</span><br>{{ state.oam.sqlWhere }}</li>
                 <li><span>Where</span><br>{{ state.oam.sqlWhere }}</li>
+                <li><span>Count</span><br>{{ state.oam.sqlCount }}</li>
                 <li><span>Order</span><br>{{ state.oam.sqlOrder }}</li>
                 <li><span>Order</span><br>{{ state.oam.sqlOrder }}</li>
                 <li><span>说明</span><br>{{ state.oam.oamDesc }}</li>
                 <li><span>说明</span><br>{{ state.oam.oamDesc }}</li>
               </ol>
               </ol>

+ 9 - 10
src/views/biz/object/index.vue

@@ -289,20 +289,19 @@ const onObjectDelete = (row: any) => {
 
 
             <el-table-column prop="objectCode" label="代码" header-align="center" align="center" width="150" />
             <el-table-column prop="objectCode" label="代码" header-align="center" align="center" width="150" />
 
 
-            <el-table-column prop="objectType" label="类型" header-align="center" align="center" width="150">
-              <template #default="scope">
-                <span v-if="scope.row.objectType === 1">实体对象</span>
-                <span v-else>视图对象</span>
-              </template>
-            </el-table-column>
-
             <el-table-column prop="comment" label="说明" header-align="center" align="left" />
             <el-table-column prop="comment" label="说明" header-align="center" align="left" />
 
 
             <el-table-column label="操作" header-align="center" align="center" width="230">
             <el-table-column label="操作" header-align="center" align="center" width="230">
               <template #default="scope">
               <template #default="scope">
-                <el-button type="primary" size="small" plain @click="onObjectOAM(scope.row)">行为</el-button>
-                <el-button type="warning" size="small" plain @click="onObjectEdit(scope.row)">编辑</el-button>
-                <el-button type="danger" size="small" plain @click="onObjectDelete(scope.row)">删除</el-button>
+                <el-button type="primary" size="small" plain @click="onObjectOAM(scope.row)">
+                  行为
+                </el-button>
+                <el-button type="warning" size="small" plain @click="onObjectEdit(scope.row)">
+                  编辑
+                </el-button>
+                <el-button type="danger" size="small" plain @click="onObjectDelete(scope.row)">
+                  删除
+                </el-button>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
           </el-table>
           </el-table>

+ 1 - 2
src/views/model/object/index.vue

@@ -297,9 +297,8 @@ const onObjectDelete = (row: any) => {
 
 
             <el-table-column prop="comment" label="说明" header-align="center" align="left" />
             <el-table-column prop="comment" label="说明" header-align="center" align="left" />
 
 
-            <el-table-column label="操作" header-align="center" align="center" width="230">
+            <el-table-column label="操作" header-align="center" align="center" width="170">
               <template #default="scope">
               <template #default="scope">
-                <el-button type="primary" size="small" plain @click="onObjectOAM(scope.row)">行为</el-button>
                 <el-button type="warning" size="small" plain @click="onObjectEdit(scope.row)">编辑</el-button>
                 <el-button type="warning" size="small" plain @click="onObjectEdit(scope.row)">编辑</el-button>
                 <el-button type="danger" size="small" plain @click="onObjectDelete(scope.row)">删除</el-button>
                 <el-button type="danger" size="small" plain @click="onObjectDelete(scope.row)">删除</el-button>
               </template>
               </template>