CzRger 5 months ago
parent
commit
0b1e3b4841
2 changed files with 8 additions and 17 deletions
  1. 5 0
      src/api/modules/manage/service.ts
  2. 3 17
      src/views/manage/service/index.vue

+ 5 - 0
src/api/modules/manage/service.ts

@@ -35,3 +35,8 @@ export const outsideServiceFindById = (id: any) => handle({
   url: `/${suffix}/api/outsideService/findById/${id}`,
   method: 'get',
 })
+// 删除
+export const outsideServiceDelete = (id: any) => handle({
+  url: `/${suffix}/api/outsideService/delete/${id}`,
+  method: 'get',
+})

+ 3 - 17
src/views/manage/service/index.vue

@@ -52,24 +52,16 @@
       </CusTable>
     </div>
     <DetailCom v-model:show="state.detail.show" :transfer="state.detail.transfer" @refresh="onSearch"/>
-<!--    <RelationCom v-model:show="state.relation.show" :transfer="state.relation.transfer" @refresh="onSearch"/>-->
-<!--    <TextCom v-model:show="state.text.show" :transfer="state.text.transfer"/>-->
-<!--    <ThemeCom v-model:show="state.theme.show" :transfer="state.theme.transfer"/>-->
   </div>
 </template>
 
 <script setup lang="ts">
 import {getCurrentInstance, onMounted, reactive} from "vue";
 import {ElMessage, ElMessageBox} from "element-plus";
-import {
-  sysIndexDeleteIndexById,
-} from "@/api/modules/manage";
 import DetailCom from "./detail.vue";
-// import RelationCom from "./relation.vue";
-// import TextCom from "./text.vue";
-// import ThemeCom from "./theme.vue";
 import {useDictionaryStore} from "@/stores";
 import {
+  outsideServiceDelete,
   outsideServiceFindByPage,
   outsideServiceStatusUpdate, sysPluginGetAllParsePlugins,
   sysPluginGetAllPlugins
@@ -153,12 +145,6 @@ const onReset = () => {
   state.query.form = {}
   onSearch()
 }
-const onRelation = (row) => {
-  state.relation.transfer = {
-    id: row.id
-  }
-  state.relation.show = true
-}
 const onTheme = (row) => {
   state.theme.transfer = {
     row: JSON.parse(JSON.stringify(row))
@@ -179,13 +165,13 @@ const onEdit = (row) => {
   state.detail.show = true
 }
 const onDel = (row) => {
-  ElMessageBox.confirm(`请确认是否删除${row.indexName}?`, "提示", {
+  ElMessageBox.confirm(`请确认是否删除${row.serviceName}?`, "提示", {
     confirmButtonText: "确定",
     cancelButtonText: "取消",
     type: "warning",
   } as any).then(() => {
     state.query.loading = true
-    sysIndexDeleteIndexById(row.id).then(res => {
+    outsideServiceDelete(row.id).then(res => {
       ElMessage.success('删除成功!')
       state.query.loading = false
       onSearch()