|
@@ -1,22 +1,28 @@
|
|
|
<template>
|
|
|
- <el-dialog v-model="visible" draggable :title="title" :width="width" :height="height" append-to-body
|
|
|
- :close-on-click-modal="false">
|
|
|
- <div class="p-2" v-if="multiInstance === 'add'">
|
|
|
+ <el-dialog v-model="visible" draggable :title="title" :width="width" :height="height" append-to-body :close-on-click-modal="false">
|
|
|
+ <div v-if="multiInstance === 'add'" class="p-2">
|
|
|
<el-row :gutter="20">
|
|
|
<!-- 部门树 -->
|
|
|
<el-col :lg="4" :xs="24" style="">
|
|
|
<el-card shadow="hover">
|
|
|
<el-input v-model="deptName" placeholder="请输入部门名称" prefix-icon="Search" clearable />
|
|
|
- <el-tree class="mt-2" ref="deptTreeRef" node-key="id" :data="deptOptions"
|
|
|
- :props="{ label: 'label', children: 'children' }" :expand-on-click-node="false"
|
|
|
- :filter-node-method="filterNode" highlight-current default-expand-all
|
|
|
- @node-click="handleNodeClick"></el-tree>
|
|
|
+ <el-tree
|
|
|
+ ref="deptTreeRef"
|
|
|
+ class="mt-2"
|
|
|
+ node-key="id"
|
|
|
+ :data="deptOptions"
|
|
|
+ :props="{ label: 'label', children: 'children' }"
|
|
|
+ :expand-on-click-node="false"
|
|
|
+ :filter-node-method="filterNode"
|
|
|
+ highlight-current
|
|
|
+ default-expand-all
|
|
|
+ @node-click="handleNodeClick"
|
|
|
+ ></el-tree>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
<el-col :lg="20" :xs="24">
|
|
|
- <transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
|
|
- :leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
|
- <div class="search" v-show="showSearch">
|
|
|
+ <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
|
+ <div v-show="showSearch" class="search">
|
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
|
<el-form-item label="用户名称" prop="userName">
|
|
|
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
|
|
@@ -25,8 +31,8 @@
|
|
|
<el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable @keyup.enter="handleQuery" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" @click="handleQuery" icon="Search">搜索</el-button>
|
|
|
- <el-button @click="resetQuery" icon="Refresh">重置</el-button>
|
|
|
+ <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -35,17 +41,16 @@
|
|
|
<el-card shadow="hover">
|
|
|
<template #header>
|
|
|
<el-row :gutter="10">
|
|
|
- <right-toolbar v-model:showSearch="showSearch" @queryTable="handleQuery" :search="true"></right-toolbar>
|
|
|
+ <right-toolbar v-model:showSearch="showSearch" :search="true" @query-table="handleQuery"></right-toolbar>
|
|
|
</el-row>
|
|
|
</template>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="userList" ref="multipleTableRef" row-key="userId"
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
+ <el-table ref="multipleTableRef" v-loading="loading" :data="userList" row-key="userId" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
|
- <el-table-column label="用户编号" align="center" key="userId" prop="userId" />
|
|
|
- <el-table-column label="用户名称" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" width="120" />
|
|
|
+ <el-table-column key="userId" label="用户编号" align="center" prop="userId" />
|
|
|
+ <el-table-column key="userName" label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column key="nickName" label="用户昵称" align="center" prop="nickName" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column key="phonenumber" label="手机号码" align="center" prop="phonenumber" width="120" />
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
|
|
<template #default="scope">
|
|
|
<span>{{ scope.row.createTime }}</span>
|
|
@@ -53,18 +58,23 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
- <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
- v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
|
|
|
+ <pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ v-model:page="queryParams.pageNum"
|
|
|
+ v-model:limit="queryParams.pageSize"
|
|
|
+ :total="total"
|
|
|
+ @pagination="handleQuery"
|
|
|
+ />
|
|
|
</el-card>
|
|
|
<el-card shadow="hover">
|
|
|
- <el-tag v-for="(user, index) in chooseUserList" :key="user.userId" style="margin:2px" closable
|
|
|
- @close="handleCloseTag(user, index)">{{ user.userName }}
|
|
|
+ <el-tag v-for="(user, index) in chooseUserList" :key="user.userId" style="margin: 2px" closable @close="handleCloseTag(user, index)"
|
|
|
+ >{{ user.userName }}
|
|
|
</el-tag>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <div class="p-2" v-if="multiInstance === 'delete'">
|
|
|
+ <div v-if="multiInstance === 'delete'" class="p-2">
|
|
|
<el-table v-loading="loading" :data="taskList" @selection-change="handleTaskSelection">
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
<el-table-column prop="name" label="任务名称" />
|
|
@@ -285,7 +295,7 @@ const handleNodeClick = (data: DeptVO) => {
|
|
|
//删除tag
|
|
|
const handleCloseTag = (user: UserVO, index: any) => {
|
|
|
if (multipleTableRef.value.selection && multipleTableRef.value.selection.length > 0) {
|
|
|
- multipleTableRef.value.selection.forEach((u: UserVO, i: Number) => {
|
|
|
+ multipleTableRef.value.selection.forEach((u: UserVO, i: number) => {
|
|
|
if (user.userId === u.userId) {
|
|
|
multipleTableRef.value.selection.splice(i, 1);
|
|
|
}
|