|
|
@ -1,10 +1,8 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import type { MatrixQuery } from 'apis/matrix' |
|
|
|
import { del, list } from 'apis/point' |
|
|
|
import { list } from 'apis/point' |
|
|
|
import FtButton from 'components/common/FTButton/index.vue' |
|
|
|
import Edit from 'components/point/Edit/index.vue' |
|
|
|
import { ElMessageBox } from 'element-plus' |
|
|
|
import { FtMessage } from 'libs/message' |
|
|
|
|
|
|
|
import { onMounted, ref } from 'vue' |
|
|
|
|
|
|
@ -31,10 +29,10 @@ const getList = async () => { |
|
|
|
const addVisible = ref(false) |
|
|
|
|
|
|
|
const formData = ref({}) |
|
|
|
const addHandle = () => { |
|
|
|
formData.value = {} |
|
|
|
addVisible.value = true |
|
|
|
} |
|
|
|
// const addHandle = () => { |
|
|
|
// formData.value = {} |
|
|
|
// addVisible.value = true |
|
|
|
// } |
|
|
|
|
|
|
|
const pageChange = (pageNum: number, pageSize: number) => { |
|
|
|
query.value.pageNum = pageNum |
|
|
@ -58,23 +56,23 @@ const editHandle = () => { |
|
|
|
addVisible.value = true |
|
|
|
} |
|
|
|
|
|
|
|
const delHandle = async () => { |
|
|
|
const ids = selectedData.value.map((item: any) => item.id) |
|
|
|
ElMessageBox.confirm('确认删除?', '提示', { |
|
|
|
type: 'warning', |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
showCancelButton: true, |
|
|
|
showClose: false, |
|
|
|
closeOnClickModal: false, |
|
|
|
closeOnPressEscape: false, |
|
|
|
closeOnHashChange: false, |
|
|
|
}).then(async () => { |
|
|
|
await del(ids.join(',')) |
|
|
|
FtMessage.success('删除成功') |
|
|
|
await getList() |
|
|
|
}) |
|
|
|
} |
|
|
|
// const delHandle = async () => { |
|
|
|
// const ids = selectedData.value.map((item: any) => item.id) |
|
|
|
// ElMessageBox.confirm('确认删除?', '提示', { |
|
|
|
// type: 'warning', |
|
|
|
// confirmButtonText: '确定', |
|
|
|
// cancelButtonText: '取消', |
|
|
|
// showCancelButton: true, |
|
|
|
// showClose: false, |
|
|
|
// closeOnClickModal: false, |
|
|
|
// closeOnPressEscape: false, |
|
|
|
// closeOnHashChange: false, |
|
|
|
// }).then(async () => { |
|
|
|
// await del(ids.join(',')) |
|
|
|
// FtMessage.success('删除成功') |
|
|
|
// await getList() |
|
|
|
// }) |
|
|
|
// } |
|
|
|
</script> |
|
|
|
|
|
|
|
<template> |
|
|
@ -83,15 +81,15 @@ const delHandle = async () => { |
|
|
|
<el-col :span="12" /> |
|
|
|
<el-col :span="12"> |
|
|
|
<div style="float: right"> |
|
|
|
<FtButton type="primary" @click="addHandle"> |
|
|
|
新增 |
|
|
|
</FtButton> |
|
|
|
<!-- <FtButton type="primary" @click="addHandle"> --> |
|
|
|
<!-- 新增 --> |
|
|
|
<!-- </FtButton> --> |
|
|
|
<FtButton :disabled="selectedData.length !== 1" @click="editHandle"> |
|
|
|
编辑 |
|
|
|
</FtButton> |
|
|
|
<FtButton :disabled="selectedData.length === 0" @click="delHandle"> |
|
|
|
删除 |
|
|
|
</FtButton> |
|
|
|
<!-- <FtButton :disabled="selectedData.length === 0" @click="delHandle"> --> |
|
|
|
<!-- 删除 --> |
|
|
|
<!-- </FtButton> --> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|