CzRger 6 maanden geleden
bovenliggende
commit
478c14a76e
3 gewijzigde bestanden met toevoegingen van 10 en 4 verwijderingen
  1. 5 0
      src/api/modules/manage/theme.ts
  2. 2 1
      src/views/manage/index/index.vue
  3. 3 3
      src/views/manage/theme/relation.vue

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

@@ -75,4 +75,9 @@ export const sysThemeIndexMainConfig = (params: any) => handle({
   url: `/${suffix}/sysThemeIndex/mainConfig`,
   method: 'post',
   params
+})
+// 索引构成删除
+export const sysThemeIndexDelete = (id: any) => handle({
+  url: `/${suffix}/sysThemeIndex/delete/${id}`,
+  method: 'get',
 })

+ 2 - 1
src/views/manage/index/index.vue

@@ -34,6 +34,7 @@
         </template>
         <template #do-column-value="{scope}">
           <CusButton type="table" icon="relation" title="关联分类" @click="onRelation(scope.row)"/>
+          <CusButton type="table" icon="relation" title="关联主题" @click="onRelation(scope.row)"/>
           <CusButton type="table-add" icon="text" title="字段" @click="onText(scope.row)"/>
           <CusButton type="table-edit" @click="onEdit(scope.row)"/>
           <CusButton type="table-del" @click="onDel(scope.row)"/>
@@ -87,7 +88,7 @@ const state: any = reactive({
       {value: "createTime", label: "创建时间", width: 200},
       {value: "updateTime", label: "最后修改时间", width: 200},
       {value: "remark", label: "备注", width: 200},
-      {value: "do", label: "操作", width: 320, fixed: 'right'},
+      {value: "do", label: "操作", width: 420, fixed: 'right'},
     ],
     form: {},
     formReal: {},

+ 3 - 3
src/views/manage/theme/relation.vue

@@ -59,7 +59,7 @@ import {
   sysLabelDeleteLink,
   sysLabelGetAllIndexsByKey
 } from "@/api/modules/manage/type";
-import {sysThemeFind, sysThemeIndexFindAll} from "@/api/modules/manage/theme";
+import {sysThemeFind, sysThemeIndexDelete, sysThemeIndexFindAll} from "@/api/modules/manage/theme";
 
 const emit = defineEmits(['update:show', 'refresh'])
 const {proxy} = getCurrentInstance()
@@ -188,13 +188,13 @@ const onEdit = (row) => {
   state.relationDetail.show = true
 }
 const onDel = (row) => {
-  ElMessageBox.confirm(`请确认是否取消关联${row.indexName}?`, "提示", {
+  ElMessageBox.confirm(`请确认是否删除${row.indexName}?`, "提示", {
     confirmButtonText: "确定",
     cancelButtonText: "取消",
     type: "warning",
   } as any).then(() => {
     state.loading = true
-    sysLabelDeleteLink(row.id).then(res => {
+    sysThemeIndexDelete(row.id).then(res => {
       if (res.code === 200) {
         ElMessage.success('删除成功!')
         emit('refresh')