|
@@ -2,7 +2,7 @@
|
|
|
<div class="pageWrap">
|
|
|
<div class="content-warp flex-column-page-wrap">
|
|
|
<!-- 公用搜索组件 -->
|
|
|
- <LeSearchForm ref="searchForm" v-model:searchData="searchData" :forms="forms" :loading="tableOpts.options.loading"> </LeSearchForm>
|
|
|
+ <LeSearchForm ref="searchForm" v-model:searchData="searchData" :forms="forms" :loading="tableOpts.options.loading"></LeSearchForm>
|
|
|
|
|
|
<!-- LeTable 组件使用 -->
|
|
|
<LeTable
|
|
@@ -64,7 +64,7 @@
|
|
|
<script lang="tsx" setup>
|
|
|
import department from '@/api/system/department'
|
|
|
import { computed, nextTick, ref, watch } from 'vue'
|
|
|
-import {ElMessage, ElMessageBox, ElTree} from 'element-plus'
|
|
|
+import { ElMessage, ElMessageBox, ElTree } from 'element-plus'
|
|
|
import { useTablePage } from '@/hooks/useTablePage'
|
|
|
import { Plus, Delete } from '@element-plus/icons-vue'
|
|
|
import StatusIndicator from '@/components/StatusIndicator'
|
|
@@ -273,14 +273,14 @@ const { searchData, tableOpts, checkedColumns, activeColumns, updateParams } = u
|
|
|
|
|
|
// 删除
|
|
|
const deleteItem = async ids => {
|
|
|
- try {
|
|
|
- await department.departmentDeleteApi(ids)
|
|
|
- ElMessage.success(`删除成功~`)
|
|
|
- updateParams()
|
|
|
- } catch (e) {
|
|
|
- console.log('删除失败')
|
|
|
- ElMessage.error(`删除失败~`)
|
|
|
- }
|
|
|
+ // try {
|
|
|
+ await department.departmentDeleteApi(ids)
|
|
|
+ ElMessage.success(`删除成功~`)
|
|
|
+ updateParams()
|
|
|
+ // } catch (e) {
|
|
|
+ // console.log('删除失败')
|
|
|
+ // ElMessage.error(`删除失败~`)
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
// 单个删除
|
|
@@ -291,14 +291,14 @@ const table_del = row => {
|
|
|
//批量删除
|
|
|
const batch_del = () => {
|
|
|
const ids = curSelectionRows.value.map(item => item.id) // 多选数据
|
|
|
- ElMessageBox.confirm('是否删除选中数据?', '提示', {
|
|
|
- confirmButtonText: '确认',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'error',
|
|
|
- buttonSize: 'default'
|
|
|
- }).then(() => {
|
|
|
- deleteItem(ids)
|
|
|
- })
|
|
|
+ ElMessageBox.confirm('是否删除选中数据?', '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'error',
|
|
|
+ buttonSize: 'default'
|
|
|
+ }).then(() => {
|
|
|
+ deleteItem(ids)
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const table_edit = async row => {
|