This commit is contained in:
sjl
2025-02-13 15:40:13 +08:00
parent ddeb84fcfe
commit 475d236b7e
10 changed files with 149 additions and 88 deletions

View File

@@ -29,26 +29,21 @@
</template>
<script setup lang='tsx' name='useRole'>
import TimeControl from '@/components/TimeControl/index.vue'
import { type ICD } from '@/api/device/interface/icd'
import { useHandleData } from '@/hooks/useHandleData'
import { useDownload } from '@/hooks/useDownload'
import ProTable from '@/components/ProTable/index.vue'
import { type ProTableInstance, type ColumnProps } from '@/components/ProTable/interface'
import { CirclePlus, Delete, EditPen, Download, Upload } from '@element-plus/icons-vue'
import { useDictStore } from '@/stores/modules/dict'
import {
getICDList,
deleteICD,
} from '@/api/device/icd/index.ts'
import { reactive, ref } from 'vue'
import { useModeStore, useAppSceneStore } from '@/stores/modules/mode'
defineOptions({
name: 'devType',
})
const modeStore = useModeStore()
const dictStore = useDictStore()
// ProTable 实例
const proTable = ref<ProTableInstance>()
const icdPopup = ref()
@@ -101,14 +96,14 @@
}
// 批量删除设备
// 批量删除icd
const batchDelete = async (id: string[]) => {
await useHandleData(deleteICD, id, '删除所选icd')
proTable.value?.clearSelection()
proTable.value?.getTableList()
}
// 删除设备
// 删除设备icd
const handleDelete = async (params: ICD.ResICD) => {
await useHandleData(deleteICD, [params.id] , `删除【${params.name}】icd`)
proTable.value?.getTableList()