houyaf vor 3 Jahren
Ursprung
Commit
af7d6af7d3
2 geänderte Dateien mit 11 neuen und 19 gelöschten Zeilen
  1. 6 7
      src/views/biz/oam/index.vue
  2. 5 12
      src/views/model/oam/index.vue

+ 6 - 7
src/views/biz/oam/index.vue

@@ -164,15 +164,15 @@ const onTreeNodeClick = async (node: TreeNode) => {
 }
 
 const objectOAMRef = ref()
-const onAddOAM = () => {
+const onObjectOAMAdd = () => {
   objectOAMRef.value.showAddModel(bizId, objectId)
 }
 
-const onEditOAM = () => {
+const onObjectOAMEdit = () => {
   objectOAMRef.value.showEditModel(bizId, objectId, state.curOamId)
 }
 
-const onDeleteOAM = (data: { bizId: number; objectId: number; oamId: number; oamTitle: string }) => {
+const onObjectOAMDelete = (data: { bizId: number; objectId: number; oamId: number; oamTitle: string }) => {
   const { bizId, objectId, oamId, oamTitle } = data
   ElMessageBox.confirm(`确认删除「${oamTitle}」吗?`, '确认信息').then(async () => {
     await deleteObjectOAMById(bizId, objectId, oamId)
@@ -306,7 +306,7 @@ function goBack() {
       <LayoutContainer left-side-width="250px" hide-left-side-toggle>
         <template #leftSide>
           <el-button-group class="btns">
-            <el-button type="primary" class="add" @click="onAddOAM()">
+            <el-button type="primary" class="add" @click="onObjectOAMAdd()">
               <template #icon>
                 <el-icon>
                   <svg-icon name="i-ep:plus" />
@@ -356,9 +356,8 @@ function goBack() {
                 border
               >
                 <template #extra>
-                  <el-button type="primary" @click="onEditOAM">
-                    编辑
-                  </el-button>
+                  <el-button type="primary" @click="onObjectOAMEdit">编辑</el-button>
+                  <el-button type="primary" @click="onObjectOAMDelete">删除</el-button>
                 </template>
 
                 <el-descriptions-item

+ 5 - 12
src/views/model/oam/index.vue

@@ -129,17 +129,15 @@ const onTreeNodeClick = (node: TreeNode) => {
 }
 
 const objectOAMRef = ref()
-const onAdd = () => {
-  window.console.log(modelId)
-  window.console.log(objectId)
+const onObjectOAMAdd = () => {
   objectOAMRef.value.showAddModel(modelId, objectId)
 }
 
-const onEdit = () => {
+const onObjectOAMEdit = () => {
   objectOAMRef.value.showEditModel(modelId, objectId, state.curOamId)
 }
 
-const onDelete = (data: { modelId: number; objectId: number; oamId: number; oamTitle: string }) => {
+const onObjectOAMDelete = (data: { modelId: number; objectId: number; oamId: number; oamTitle: string }) => {
   const { modelId, objectId, oamId, oamTitle } = data
   ElMessageBox.confirm(`确认删除「${oamTitle}」吗?`, '确认信息').then(async () => {
     await deleteObjectOAMById(modelId, objectId, oamId)
@@ -206,13 +204,8 @@ function goBack() {
         <div class="form">
           <tool-header>
             <template #right>
-              <el-button type="primary" @click="onAdd">
-                添加
-              </el-button>
-
-              <el-button type="primary" @click="onEdit">
-                编辑
-              </el-button>
+              <el-button type="primary" @click="onObjectOAMAdd">添加</el-button>
+              <el-button type="primary" @click="onObjectOAMEdit">编辑</el-button>
             </template>
           </tool-header>
           <page-main title="SQL">