|
@@ -0,0 +1,145 @@
|
|
|
+<script setup>
|
|
|
+import { SearchIcon } from 'tdesign-icons-vue-next';
|
|
|
+
|
|
|
+const jobOpts = [
|
|
|
+ {
|
|
|
+ label: '在职',
|
|
|
+ value: '在职'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '离职',
|
|
|
+ value: '离职'
|
|
|
+ }
|
|
|
+]
|
|
|
+const accountStatusOpts = [
|
|
|
+ {
|
|
|
+ label: '启用',
|
|
|
+ value: '启用'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '禁用',
|
|
|
+ value: '禁用'
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
+const filterState = reactive({
|
|
|
+ jobStatus: '',
|
|
|
+ accountStatus: '',
|
|
|
+ customer: '',
|
|
|
+ keyword: ''
|
|
|
+})
|
|
|
+const tableData = ref([])
|
|
|
+const columns = [
|
|
|
+ { align: 'center', colKey: '', title: '姓名' },
|
|
|
+ { align: 'center', colKey: '', title: '手机号' },
|
|
|
+ { align: 'center', colKey: '', title: '岗位-部门' },
|
|
|
+ { align: 'center', colKey: '', title: '最近登录时间', sorter: true, },
|
|
|
+ { align: 'center', colKey: '', title: '在职状态' },
|
|
|
+ { align: 'center', colKey: '', title: '账号状态' },
|
|
|
+ { align: 'center', colKey: '', title: '客户名称' },
|
|
|
+ {
|
|
|
+ align: 'center',
|
|
|
+ colKey: 'opt',
|
|
|
+ title: '操作',
|
|
|
+ },
|
|
|
+]
|
|
|
+const tablePagination = {
|
|
|
+ defaultCurrent: 1,
|
|
|
+ defaultPageSize: 20,
|
|
|
+ total: 0,
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div class="customer-userlist-page">
|
|
|
+ <div class="bg-white flex top-wrap">
|
|
|
+ <t-button style="width: 120px">新增用户</t-button>
|
|
|
+ <t-button style="width: 120px; margin-left: 10px">批量导入用户</t-button>
|
|
|
+ <t-input
|
|
|
+ style="width: 310px; margin-left: auto"
|
|
|
+ placeholder="姓名/手机号"
|
|
|
+ >
|
|
|
+ <template #prefixIcon><SearchIcon /></template>
|
|
|
+ </t-input>
|
|
|
+ </div>
|
|
|
+ <div class="bg-white main-wrap">
|
|
|
+ <div class="flex filter-wrap">
|
|
|
+ <t-select
|
|
|
+ placeholder="请选择在职状态"
|
|
|
+ v-model:value="filterState.jobStatus"
|
|
|
+ clearable
|
|
|
+ style="width: 240px"
|
|
|
+ >
|
|
|
+ <t-option
|
|
|
+ v-for="item in jobOpts"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </t-select>
|
|
|
+ <t-select
|
|
|
+ placeholder="请选择账号状态"
|
|
|
+ v-model:value="filterState.accountStatus"
|
|
|
+ clearable
|
|
|
+ style="width: 240px"
|
|
|
+ >
|
|
|
+ <t-option
|
|
|
+ v-for="item in accountStatusOpts"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </t-select>
|
|
|
+ <t-select
|
|
|
+ placeholder="客户名称"
|
|
|
+ v-model:value="filterState.customer"
|
|
|
+ clearable
|
|
|
+ style="width: 240px"
|
|
|
+ >
|
|
|
+ <!-- <t-option
|
|
|
+ v-for="item in jobOpts"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ /> -->
|
|
|
+ </t-select>
|
|
|
+ </div>
|
|
|
+ <t-table
|
|
|
+ rowKey="id"
|
|
|
+ :data="tableData"
|
|
|
+ :columns="columns"
|
|
|
+ bordered
|
|
|
+ :pagination="tablePagination"
|
|
|
+ show-header
|
|
|
+ resizable
|
|
|
+ >
|
|
|
+ <template #cellEmptyContent="{ col }">
|
|
|
+ <div v-if="col.colKey === 'opt'">
|
|
|
+ <t-button size="small" variant="text" theme="primary">编辑</t-button>
|
|
|
+ <t-button size="small" variant="text" theme="primary">启用</t-button>
|
|
|
+ <t-button size="small" variant="text" theme="danger">禁用</t-button>
|
|
|
+ <t-button size="small" variant="text" theme="primary">移动</t-button>
|
|
|
+ <t-button size="small" variant="text" theme="danger">删除</t-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </t-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.top-wrap {
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
+.main-wrap {
|
|
|
+ margin-top: 20px;
|
|
|
+ padding: 20px;
|
|
|
+ .filter-wrap {
|
|
|
+ gap: 10px;
|
|
|
+ margin-bottom: 30px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|