feat:人员调动tab
This commit is contained in:
1 parent
b84f5e4392
commit
344fe2601c
3 files changed
+110
-82
No files matched your search
@@ -48,14 +48,19 @@
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'admin_sysUserTransaction_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
></right-toolbar>
|
||||
<div class="flex justify-between items-center">
|
||||
<el-tabs class="flex-1" v-model="activeName" @tab-click="handleClickTabItem">
|
||||
<el-tab-pane v-for="v in tabItems" :key="v.id" :label="v.label" :name="v.value" />
|
||||
</el-tabs>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'admin_sysUserTransaction_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table
|
||||
@@ -154,6 +159,7 @@
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import * as sysUserTransactionApi from "/@/api/admin/sys-user-transaction"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { getDicts } from "/@/api/admin/dict"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
// 引入组件
|
||||
@@ -170,6 +176,8 @@ const showSearch = ref(true)
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
const processDrawerRef = ref()
|
||||
const activeName = ref()
|
||||
const tabItems = ref<any>([{}])
|
||||
const batchDealRef = ref()
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
@@ -191,6 +199,12 @@ const taskSubmitEvent = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// tab点击切换
|
||||
const handleClickTabItem = (e: any) => {
|
||||
state.queryForm.processStatus = tabItems.value[e.index].value
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
@@ -227,4 +241,10 @@ const handleDelete = async (ids: string[]) => {
|
||||
useMessage().error(err.msg)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
const { data } = await getDicts("check_status")
|
||||
data.unshift({ label: "全部", value: null })
|
||||
tabItems.value = data
|
||||
})
|
||||
</script>
|
||||
@@ -1,76 +1,80 @@
|
||||
<template>
|
||||
<el-dialog title="使用情况" width="60%" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item class="w100" label="是否使用" prop="status">
|
||||
<dict-select v-model="state.queryForm.status" dict-code="yes_no_type" placeholder="是否使用"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">
|
||||
{{ $t('common.queryBtn') }}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t('common.resetBtn') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle" @sort-change="sortChangeHandle">
|
||||
<el-table-column type="index" label="#" width="100" />
|
||||
<el-table-column prop="username" label="申请人" />
|
||||
<el-table-column prop="code" label="申请人" >
|
||||
<template #default="{ row }">
|
||||
<preview-image :src="row.code" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="是否使用">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="yes_no_type" :value="row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="useTime" label="使用时间" />
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog title="使用情况" width="60%" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item class="w100" label="是否使用" prop="status">
|
||||
<dict-select v-model="state.queryForm.status" dict-code="yes_no_type" placeholder="是否使用" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList"> {{ $t("common.queryBtn") }}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t("common.resetBtn") }}</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="index" label="#" width="100" />
|
||||
<el-table-column prop="username" label="申请人" />
|
||||
<el-table-column prop="code" label="二维码">
|
||||
<template #default="{ row }">
|
||||
<preview-image :src="row.code" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="是否使用">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="yes_no_type" :value="row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="useTime" label="使用时间" />
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="code-use-table">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { codeList } from "/@/api/wallet/wallet-code-use";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { codeList } from "/@/api/wallet/wallet-code-use"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
// 定义变量内容
|
||||
const visible = ref(false)
|
||||
const queryRef = ref()
|
||||
// 定义查询字典
|
||||
const { yes_no_type } = useDict('check_status', 'yes_no_type');
|
||||
const { yes_no_type } = useDict("check_status", "yes_no_type")
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: codeList
|
||||
queryForm: {},
|
||||
pageList: codeList,
|
||||
})
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
// 打开弹窗
|
||||
const openDialog = (id: string) => {
|
||||
visible.value = true
|
||||
state.queryForm.bizId = ''
|
||||
// 获取walletStride信息
|
||||
if (id) {
|
||||
state.queryForm.bizId = id
|
||||
getDataList()
|
||||
}
|
||||
};
|
||||
visible.value = true
|
||||
state.queryForm.bizId = ""
|
||||
// 获取walletStride信息
|
||||
if (id) {
|
||||
state.queryForm.bizId = id
|
||||
getDataList()
|
||||
}
|
||||
}
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
getDataList()
|
||||
// 清空搜索条件
|
||||
queryRef.value?.resetFields()
|
||||
getDataList()
|
||||
}
|
||||
// 暴露变量
|
||||
defineExpose({ openDialog });
|
||||
</script>
|
||||
defineExpose({ openDialog })
|
||||
</script>
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()" v-auth="'wallet_walletFreeze_add'">
|
||||
新 增
|
||||
冻 结
|
||||
</el-button>
|
||||
<el-button
|
||||
plain
|
||||
@@ -67,22 +67,26 @@
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="processTime" label="审核时间" />
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<el-table-column label="操作" width="250">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.processStatus == '1' && row.isCheckUser" icon="VideoPlay" text type="primary" @click="deal(row)">
|
||||
开始处理
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
texts
|
||||
type="primary"
|
||||
v-auth="'wallet_walletFreeze_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_walletFreeze_del'" @click="handleDelete([row.id])">删除</el-button>
|
||||
<div class="flex">
|
||||
<el-button v-if="row.processStatus == '1' && row.isCheckUser" icon="VideoPlay" text type="primary" @click="deal(row)">
|
||||
开始处理
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
texts
|
||||
type="primary"
|
||||
v-auth="'wallet_walletFreeze_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_walletFreeze_del'" @click="handleDelete([row.id])">
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
Reference in new issue
Block a user