|
|
@@ -1,239 +1,178 @@
|
|
|
<template>
|
|
|
- <div class="member">
|
|
|
- <div class="member-tree">
|
|
|
- <el-input
|
|
|
- v-model="filterText"
|
|
|
- style="width: 240px"
|
|
|
- placeholder="姓名,手机号,工号查询"
|
|
|
- :prefix-icon="Search"
|
|
|
- />
|
|
|
- <div style="display: flex;justify-content: space-between;margin: 10px 0;">
|
|
|
- <!-- <el-button type="primary" link @click="$router.push({path:'/personnel/institution'})">机构管理</el-button> -->
|
|
|
- <el-button type="primary" link @click="expandTree">
|
|
|
-
|
|
|
- {{ isExpand?'全部收起':'全部展开' }}
|
|
|
- </el-button>
|
|
|
+ <PageMain class="vh100">
|
|
|
+ <div class=" flex j-s">
|
|
|
+ <div class="member-tree mr-4">
|
|
|
+ <el-input v-model="filterText" style="width: 240px" placeholder="姓名,手机号,工号查询" :prefix-icon="Search" />
|
|
|
+ <div style="display: flex;justify-content: space-between;margin: 10px 0;">
|
|
|
+ <!-- <el-button type="primary" link @click="$router.push({path:'/personnel/institution'})">机构管理</el-button> -->
|
|
|
+ <el-button type="primary" link @click="expandTree">
|
|
|
+
|
|
|
+ {{ isExpand ? '全部收起' : '全部展开' }}
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <el-tree ref="treeRef" style="max-width: 600px" class="filter-tree" :data="deptTreeData" :props="defaultProps"
|
|
|
+ :default-expand-all="isExpand" :filter-node-method="filterNode" :expand-on-click-node="false"
|
|
|
+ @node-click="treeClickTable">
|
|
|
+ <template #default="{ node, data }">
|
|
|
+ <span class="custom-tree-node">
|
|
|
+ <span>{{ node.label }}</span>
|
|
|
+ <span>
|
|
|
+ <el-dropdown>
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ <el-icon @click="append(data)">
|
|
|
+ <More />
|
|
|
+ </el-icon>
|
|
|
+ </span>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item @click="addChild(data)">添加子机构</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click="editorInstitution(data)">编辑</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click="del(data)">删除</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-tree>
|
|
|
</div>
|
|
|
- <el-tree
|
|
|
- ref="treeRef"
|
|
|
- style="max-width: 600px"
|
|
|
- class="filter-tree"
|
|
|
- :data="deptTreeData"
|
|
|
- :props="defaultProps"
|
|
|
- :default-expand-all="isExpand"
|
|
|
- :filter-node-method="filterNode"
|
|
|
- :expand-on-click-node="false"
|
|
|
- @node-click="treeClickTable"
|
|
|
- >
|
|
|
- <template #default="{ node, data }">
|
|
|
- <span class="custom-tree-node">
|
|
|
- <span>{{ node.label }}</span>
|
|
|
- <span>
|
|
|
- <el-dropdown>
|
|
|
- <span class="el-dropdown-link">
|
|
|
- <el-icon @click="append(data)"><More /></el-icon>
|
|
|
- </span>
|
|
|
+ <ComplexTable class="table" :tableData="tableData" :columns="columns" :showIndex="false" :columnwidth="150"
|
|
|
+ :showSelect="true" :pageInfo="pageInfo" @getList="getList" @selectionChange="selectChange"
|
|
|
+ :showOperation="true">
|
|
|
+ <template v-slot:table-title-btn>
|
|
|
+ <div class="flex j-s">
|
|
|
+ <div>
|
|
|
+ <el-select v-model="status" style="width: 100px;" @change="statusChange()">
|
|
|
+ <!-- status -->
|
|
|
+ <el-option :label="'全部'" :value="'-1'"></el-option>
|
|
|
+ <el-option v-for="item in statusList" :key="item.id" :label="item.label"
|
|
|
+ :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button class="ml-2" @click="showAllMember()">展示全部成员</el-button>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-button type="primary" @click="add(ruleFormRef)">
|
|
|
+ <el-icon>
|
|
|
+ <Plus />
|
|
|
+ </el-icon>添加成员</el-button>
|
|
|
+ <el-dropdown placement="bottom-start">
|
|
|
+ <el-button>
|
|
|
+ 批量操作<el-icon class="el-icon--right">
|
|
|
+ <arrow-down />
|
|
|
+ </el-icon>
|
|
|
+ </el-button>
|
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
|
- <el-dropdown-item @click="addChild(data)">添加子机构</el-dropdown-item>
|
|
|
- <el-dropdown-item @click="editorInstitution(data)">编辑</el-dropdown-item>
|
|
|
- <el-dropdown-item @click="del(data)">删除</el-dropdown-item>
|
|
|
+ <el-dropdown-item :disabled="checkTableIdList.length > 0 ? false : true"
|
|
|
+ v-on:click="delsUser">批量删除</el-dropdown-item>
|
|
|
+ <!-- <el-dropdown-item>批量禁用</el-dropdown-item>
|
|
|
+ <el-dropdown-item>批量启用</el-dropdown-item> -->
|
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
|
</el-dropdown>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-tree>
|
|
|
- </div>
|
|
|
- <div class="member-main">
|
|
|
- <Table
|
|
|
- :tableData="tableData"
|
|
|
- :columns="columns"
|
|
|
- :showIndex="false"
|
|
|
- :showSelect="true"
|
|
|
- :pageInfo="pageInfo"
|
|
|
- :height="700"
|
|
|
- @getList="getList"
|
|
|
- @select-all-change="selectAllChange"
|
|
|
- @select-change="selectChange"
|
|
|
- >
|
|
|
- <template v-slot:table-title-btn>
|
|
|
- <div>
|
|
|
- <el-select v-model="status" style="width: 100px;" @change="statusChange()">
|
|
|
- <!-- status -->
|
|
|
- <el-option
|
|
|
- :label="'全部'" :value="'-1'"
|
|
|
- ></el-option>
|
|
|
- <el-option v-for="item in statusList" :key="item.id"
|
|
|
- :label="item.label" :value="item.value"
|
|
|
- ></el-option>
|
|
|
- <!-- <el-option :value="'add'">启用</el-option>
|
|
|
- <el-option :value="'add'">禁用</el-option> -->
|
|
|
- </el-select>
|
|
|
- <el-button style="margin-left: 10px;" @click="showAllMember()">展示全部成员</el-button>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-button type="primary" @click="add(ruleFormRef)" >
|
|
|
- <el-icon><Plus /></el-icon>添加成员</el-button>
|
|
|
- <Auth :value="'member:delete'">
|
|
|
- <el-dropdown placement="bottom-start">
|
|
|
- <el-button>
|
|
|
- 批量操作<el-icon class="el-icon--right">
|
|
|
- <arrow-down />
|
|
|
- </el-icon>
|
|
|
- </el-button>
|
|
|
- <template #dropdown>
|
|
|
- <el-dropdown-menu>
|
|
|
- <el-dropdown-item :disabled="checkTableIdList.length>0 ? false:true" v-on:click="delsUser">批量删除</el-dropdown-item>
|
|
|
- <!-- <el-dropdown-item>批量禁用</el-dropdown-item>
|
|
|
- <el-dropdown-item>批量启用</el-dropdown-item> -->
|
|
|
- </el-dropdown-menu>
|
|
|
- </template>
|
|
|
- </el-dropdown>
|
|
|
- </Auth>
|
|
|
- <el-button type="primary" :disabled="!deptItem.id" @click="manySetDeptUser()">
|
|
|
- 设置负责人</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" :disabled="!deptItem.id" @click="manySetDeptUser()">
|
|
|
+ 设置负责人</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-slot:operation="scope">
|
|
|
- <el-button type="primary" link @click="editor(scope)">
|
|
|
+ <el-button type="primary" link @click="editor(scope.operationData)">
|
|
|
详情
|
|
|
</el-button>
|
|
|
- <Auth :value="'member:edit'">
|
|
|
- <el-dropdown placement="bottom-start">
|
|
|
+ <el-dropdown placement="bottom-start">
|
|
|
<span class="el-dropdown-link"> 更 多 </span>
|
|
|
<template #dropdown>
|
|
|
- <el-dropdown-item v-on:click="changeDept(scope)"
|
|
|
- >变更机构</el-dropdown-item
|
|
|
- >
|
|
|
- <el-dropdown-item v-on:click="resign(scope)">操作离职</el-dropdown-item>
|
|
|
- <el-dropdown-item v-on:click="transfer(scope)"
|
|
|
- >资源转移</el-dropdown-item
|
|
|
- >
|
|
|
- <el-dropdown-item v-on:click="delUser(scope)">删除</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-on:click="changeDept(scope.operationData)">变更机构</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-on:click="resign(scope.operationData)">操作离职</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-on:click="transfer(scope.operationData)">资源转移</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-on:click="delUser(scope)">删除</el-dropdown-item>
|
|
|
</template>
|
|
|
</el-dropdown>
|
|
|
- </Auth>
|
|
|
-
|
|
|
</template>
|
|
|
<template v-slot:search="scope">
|
|
|
{{ scope.slotData.label }}
|
|
|
</template>
|
|
|
- </Table>
|
|
|
- </div>
|
|
|
- <el-dialog
|
|
|
- v-model="dialogVisible"
|
|
|
- title="资源转移"
|
|
|
- width="800"
|
|
|
- draggable
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <el-row :gutter="24">
|
|
|
- <el-col :span="20">
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <div class="img-title">
|
|
|
- {{ pinyin.getFullChars(operationForm.name).substring(0, 1) }}
|
|
|
+ </ComplexTable>
|
|
|
+ <el-dialog v-model="dialogVisible" title="资源转移" width="800" draggable append-to-body>
|
|
|
+ <el-row :gutter="24">
|
|
|
+ <el-col :span="20">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <div class="img-title">
|
|
|
+ {{ pinyin.getFullChars(operationForm.name).substring(0, 1) }}
|
|
|
+ </div>
|
|
|
+ <h4>{{ operationForm.name }}</h4>
|
|
|
</div>
|
|
|
- <h4>{{ operationForm.name }}</h4>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <p style="margin-left: 50px">工号:{{ transferInfo.workNumber }}</p>
|
|
|
+ <p style="margin-left: 50px">所在机构:{{ transferInfo.deptName }}</p>
|
|
|
+ <p style="margin-left: 50px">需要转移的资源</p>
|
|
|
+ <el-table :data="[{}]" style="width: 100%">
|
|
|
+ <el-table-column prop="date" label="资源" width="120">
|
|
|
+ <template #default> 业务员 </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="描述" width="180">
|
|
|
+ <template #default> 转让该成员维护的业务员 </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="address" label="数量" width="80">
|
|
|
+ <template #default> {{ transferInfo.count }}人 </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="address" label="资源接收人">
|
|
|
+ <template #default>
|
|
|
+ <el-input :value="receiveInfo?.name" @click="deptDialogVisible = true"
|
|
|
+ placeholder="输入姓名,手机号,工号查找"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="confirmTransfer">
|
|
|
+ 确认转移
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <p style="margin-left: 50px">工号:{{ transferInfo.workNumber }}</p>
|
|
|
- <p style="margin-left: 50px">所在机构:{{ transferInfo.deptName }}</p>
|
|
|
- <p style="margin-left: 50px">需要转移的资源</p>
|
|
|
- <el-table :data="[{}]" style="width: 100%">
|
|
|
- <el-table-column prop="date" label="资源" width="120">
|
|
|
- <template #default> 业务员 </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="name" label="描述" width="180">
|
|
|
- <template #default> 转让该成员维护的业务员 </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="address" label="数量" width="80">
|
|
|
- <template #default> {{ transferInfo.count }}人 </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="address" label="资源接收人">
|
|
|
- <template #default>
|
|
|
- <el-input
|
|
|
- :value="receiveInfo?.name"
|
|
|
- @click="deptDialogVisible = true"
|
|
|
- placeholder="输入姓名,手机号,工号查找"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <template #footer>
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button @click="dialogVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="confirmTransfer">
|
|
|
- 确认转移
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
- <setDept
|
|
|
- :dialogVisible="deptDialogVisible"
|
|
|
- :dept-list="deptTreeData"
|
|
|
- :dept-ids="[deptItem.id]"
|
|
|
- @close-dialog="confirmDialogInfo"
|
|
|
- :title="title"
|
|
|
- @cancel-dialog="deptDialogVisible=false"
|
|
|
- ></setDept>
|
|
|
- <el-dialog
|
|
|
- v-model="changeDeptDialog"
|
|
|
- title="变更机构"
|
|
|
- width="600"
|
|
|
- append-to-body
|
|
|
- draggable
|
|
|
- >
|
|
|
- <div>
|
|
|
- <el-input
|
|
|
- v-model="filterText"
|
|
|
- style="width: 240px"
|
|
|
- placeholder="请输入机构名称查找"
|
|
|
- :prefix-icon="Search"
|
|
|
- />
|
|
|
- <el-tree
|
|
|
- ref="treeRef"
|
|
|
- style="max-width: 600px"
|
|
|
- class="filter-tree"
|
|
|
- :data="deptTreeData"
|
|
|
- :props="defaultProps"
|
|
|
- :default-expand-all="true"
|
|
|
- :expand-on-click-node="false"
|
|
|
- :filter-node-method="filterNode"
|
|
|
- @node-click="treeClick"
|
|
|
- >
|
|
|
- <template #default="{ node, data }">
|
|
|
- <span class="custom-tree-node">
|
|
|
- <span>{{ node.label }}</span>
|
|
|
- <span>
|
|
|
- <a style="color: #00a0f4">
|
|
|
- {{ node.label == deptItem.name ? "已选" : "" }}
|
|
|
- </a>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <setDept :dialogVisible="deptDialogVisible" :dept-list="deptTreeData" :dept-ids="[deptItem.id]"
|
|
|
+ @close-dialog="confirmDialogInfo" :title="title" @cancel-dialog="deptDialogVisible = false"></setDept>
|
|
|
+ <el-dialog v-model="changeDeptDialog" title="变更机构" width="600" append-to-body draggable>
|
|
|
+ <div>
|
|
|
+ <el-input v-model="filterText" style="width: 240px" placeholder="请输入机构名称查找" :prefix-icon="Search" />
|
|
|
+ <el-tree ref="treeRef" style="max-width: 600px" class="filter-tree" :data="deptTreeData" :props="defaultProps"
|
|
|
+ :default-expand-all="true" :expand-on-click-node="false" :filter-node-method="filterNode"
|
|
|
+ @node-click="treeClick">
|
|
|
+ <template #default="{ node, data }">
|
|
|
+ <span class="custom-tree-node">
|
|
|
+ <span>{{ node.label }}</span>
|
|
|
+ <span>
|
|
|
+ <a style="color: #00a0f4">
|
|
|
+ {{ node.label == deptItem.name ? "已选" : "" }}
|
|
|
+ </a>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-tree>
|
|
|
- </div>
|
|
|
- <template #footer>
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button @click="changeDeptDialog = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="submitChangeDept"> 确认 </el-button>
|
|
|
+ </template>
|
|
|
+ </el-tree>
|
|
|
</div>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
- <!-- <el-dialog v-model="dialogVisible" title="基本信息" width="800" draggable> -->
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="changeDeptDialog = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="submitChangeDept"> 确认 </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- <el-dialog v-model="dialogVisible" title="基本信息" width="800" draggable> -->
|
|
|
<!-- <addOperation @closeDialog="closeAddOperation"></addOperation> -->
|
|
|
|
|
|
- <!-- </el-dialog> -->
|
|
|
- </div>
|
|
|
+ <!-- </el-dialog> -->
|
|
|
+ </div>
|
|
|
+ </PageMain>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
// import { ref, reactive, watch,onMounted ,h} from "vue";
|
|
|
-import {useRouter} from "vue-router"
|
|
|
+import { useRouter } from "vue-router"
|
|
|
import type { ComponentSize, FormInstance, FormRules } from "element-plus";
|
|
|
import { Plus, Search } from "@element-plus/icons-vue";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
@@ -264,7 +203,7 @@ onMounted(async () => {
|
|
|
|
|
|
//状态字典
|
|
|
const statusList = ref<dictType[]>([]);
|
|
|
-const status=ref('-1')
|
|
|
+const status = ref('-1')
|
|
|
//机构列表
|
|
|
|
|
|
type tableType = {
|
|
|
@@ -308,17 +247,17 @@ const filterNode = (value: string, data: Tree) => {
|
|
|
};
|
|
|
|
|
|
function treeClickTable(node: any) {
|
|
|
- deptItem.value=node
|
|
|
+ deptItem.value = node
|
|
|
getUserList()
|
|
|
|
|
|
}
|
|
|
//全部展示机构树,或全部收起
|
|
|
-const isExpand=ref(false)
|
|
|
-function expandTree(){
|
|
|
+const isExpand = ref(false)
|
|
|
+function expandTree() {
|
|
|
// console.log(treeRef.value)
|
|
|
|
|
|
|
|
|
- isExpand.value=!isExpand.value
|
|
|
+ isExpand.value = !isExpand.value
|
|
|
// treeRef.value!.defaultExpandAll=!isExpand.value;
|
|
|
const nodes = treeRef.value?.store._getAllNodes();
|
|
|
if (nodes) {
|
|
|
@@ -341,7 +280,7 @@ interface PageInfo {
|
|
|
pageSize: number;
|
|
|
sizes: number[];
|
|
|
total: number;
|
|
|
- show:boolean
|
|
|
+ show: boolean
|
|
|
}
|
|
|
|
|
|
const dialogVisible = ref(false);
|
|
|
@@ -380,7 +319,7 @@ const rules = reactive<FormRules<RuleForm>>({
|
|
|
|
|
|
interface Page {
|
|
|
|
|
|
- [key: string]: any
|
|
|
+ [key: string]: any
|
|
|
|
|
|
}
|
|
|
const tableData = ref<Page[]>([])
|
|
|
@@ -390,47 +329,36 @@ const columns = [
|
|
|
{ prop: "deptName", label: "所属机构" },
|
|
|
{ prop: "workNumber", label: "工号" },
|
|
|
{ prop: "roleName", label: "角色" },
|
|
|
- { prop: "status", label: "状态",
|
|
|
- formatter: (row: any, column: any, cellValue: any) => {
|
|
|
- // console.log(row)
|
|
|
+ {
|
|
|
+ prop: "status", label: "状态",
|
|
|
+ formatter: (row: any) => {
|
|
|
+ console.log(row)
|
|
|
let comType = "";
|
|
|
- statusList.value.forEach((item:any)=>{
|
|
|
- if(item.value==row.status){
|
|
|
- comType=item.label
|
|
|
+ statusList.value.forEach((item: any) => {
|
|
|
+ if (item.value == row.status) {
|
|
|
+ comType = item.label
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- return () => h("div", {}, comType);
|
|
|
+ return comType;
|
|
|
},
|
|
|
- },
|
|
|
- // { prop: "operation", label: "操作",fixed:true },
|
|
|
-
|
|
|
- // {
|
|
|
- // prop: "operation", label: "operation", width: "280",
|
|
|
- // type:'operation', btn:[{
|
|
|
- // type:"pramary",
|
|
|
- // label:"编辑"
|
|
|
- // }]
|
|
|
- // },
|
|
|
+ },
|
|
|
];
|
|
|
-const pageInfo =reactive( {
|
|
|
+const pageInfo = reactive({
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
sizes: [10, 20, 30, 40, 50],
|
|
|
total: 0,
|
|
|
- show:true
|
|
|
+ show: true
|
|
|
});
|
|
|
-function showAllMember(){
|
|
|
+function showAllMember() {
|
|
|
status.value = ''
|
|
|
- deptItem.value={}
|
|
|
+ deptItem.value = {}
|
|
|
pageInfo.pageNum = 1;
|
|
|
pageInfo.pageSize = 10;
|
|
|
getUserList()
|
|
|
}
|
|
|
|
|
|
-function statusChange(){
|
|
|
+function statusChange() {
|
|
|
pageInfo.pageNum = 1;
|
|
|
pageInfo.pageSize = 10;
|
|
|
getUserList()
|
|
|
@@ -442,39 +370,39 @@ const getList = (item: PageInfo) => {
|
|
|
getUserList()
|
|
|
};
|
|
|
|
|
|
-const getUserList= () => {
|
|
|
+const getUserList = () => {
|
|
|
api.userApi.memberList({
|
|
|
...pageInfo,
|
|
|
pages: pageInfo.pageNum,
|
|
|
size: pageInfo.pageSize,
|
|
|
- deptId:deptItem.value.id,
|
|
|
- status:status.value,
|
|
|
- isMember:1
|
|
|
- }).then((res:any)=>{
|
|
|
-
|
|
|
- if(res.code===200){
|
|
|
- tableData.value=res.data.records
|
|
|
- pageInfo.total=res.data.total
|
|
|
+ deptId: deptItem.value.id,
|
|
|
+ status: status.value,
|
|
|
+ isMember: 1
|
|
|
+ }).then((res: any) => {
|
|
|
+
|
|
|
+ if (res.code === 200) {
|
|
|
+ tableData.value = res.data.records
|
|
|
+ pageInfo.total = res.data.total
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
const editor = (item: any) => {
|
|
|
-
|
|
|
+ console.log(item)
|
|
|
router.push({
|
|
|
- path:"/personnel/member/memberMessage",
|
|
|
- query:{
|
|
|
- id:item.operationData.row.userId
|
|
|
+ path: "/personnel/member/memberMessage",
|
|
|
+ query: {
|
|
|
+ id: item.userId
|
|
|
}
|
|
|
})
|
|
|
// pageInfo.pageNum=item.pageNum
|
|
|
// pageInfo.pageSize=item.pageSize
|
|
|
};
|
|
|
-const router=useRouter()
|
|
|
+const router = useRouter()
|
|
|
const add = (formEl: FormInstance | undefined) => {
|
|
|
|
|
|
|
|
|
router.push({
|
|
|
- path:"/personnel/member/memberEdit"
|
|
|
+ path: "/personnel/member/memberEdit"
|
|
|
})
|
|
|
if (!formEl) return;
|
|
|
formEl.resetFields();
|
|
|
@@ -486,23 +414,23 @@ const add = (formEl: FormInstance | undefined) => {
|
|
|
const addChild = (item: any) => {
|
|
|
// console.log(item)
|
|
|
router.push({
|
|
|
- path:'/personnel/institution/institutionEdit',
|
|
|
- query:{
|
|
|
- type:"add",
|
|
|
- id:item.id
|
|
|
+ path: '/personnel/institution/institutionEdit',
|
|
|
+ query: {
|
|
|
+ type: "add",
|
|
|
+ id: item.id
|
|
|
}
|
|
|
})
|
|
|
|
|
|
};
|
|
|
const editorInstitution = (item: any) => {
|
|
|
|
|
|
- router.push({
|
|
|
- path:'/personnel/institution/institutionEdit',
|
|
|
- query:{
|
|
|
- type:"edit",
|
|
|
- id:item.id
|
|
|
- }
|
|
|
- })
|
|
|
+ router.push({
|
|
|
+ path: '/personnel/institution/institutionEdit',
|
|
|
+ query: {
|
|
|
+ type: "edit",
|
|
|
+ id: item.id
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
|
|
|
};
|
|
|
@@ -514,19 +442,19 @@ const del = (item: any) => {
|
|
|
confirmButtonText: "确认",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center:true
|
|
|
+ center: true
|
|
|
}).then((action) => {
|
|
|
- if(action === 'confirm') {
|
|
|
- api.institutionApi
|
|
|
- .institutionDel({
|
|
|
- id: item.id,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- ElMessage.success("操作成功");
|
|
|
- getInstitutionList(); //机构列表
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
+ if (action === 'confirm') {
|
|
|
+ api.institutionApi
|
|
|
+ .institutionDel({
|
|
|
+ id: item.id,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ ElMessage.success("操作成功");
|
|
|
+ getInstitutionList(); //机构列表
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
.catch(() => {
|
|
|
ElMessage.warning("用户取消操作");
|
|
|
});
|
|
|
@@ -554,22 +482,22 @@ const remove = (node: Node, data: Tree) => {
|
|
|
};
|
|
|
|
|
|
|
|
|
-const deptDialogVisible=ref(false)
|
|
|
+const deptDialogVisible = ref(false)
|
|
|
//判断当前机构是否可以进行变更
|
|
|
const changeDeptDialog = ref(false);
|
|
|
-const operationForm=ref({})
|
|
|
-function changeDept(item:any) {
|
|
|
- operationForm.value=item.operationData.row
|
|
|
+const operationForm = ref({})
|
|
|
+function changeDept(item: any) {
|
|
|
+ operationForm.value = item
|
|
|
api.userApi
|
|
|
.checkChangeDept({
|
|
|
- userId: item.operationData.row.userId,
|
|
|
+ userId: item.userId,
|
|
|
})
|
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
|
// transferInfo.value=res.data
|
|
|
|
|
|
changeDeptDialog.value = true;
|
|
|
- deptItem.value={}
|
|
|
+ deptItem.value = {}
|
|
|
deptItem.value.name = item.operationData.row.deptName
|
|
|
}
|
|
|
});
|
|
|
@@ -604,10 +532,10 @@ interface transfer {
|
|
|
[key: string]: any;
|
|
|
}
|
|
|
const transferInfo = ref<transfer>({});
|
|
|
-function transfer(item:any) {
|
|
|
+function transfer(item: any) {
|
|
|
// console.log(123)
|
|
|
- title.value='资源转移'
|
|
|
- operationForm.value=item.operationData.row
|
|
|
+ title.value = '资源转移'
|
|
|
+ operationForm.value = item
|
|
|
api.userApi
|
|
|
.getTransferInfo({
|
|
|
userId: operationForm.value.userId,
|
|
|
@@ -625,8 +553,8 @@ function transfer(item:any) {
|
|
|
}
|
|
|
|
|
|
//删除成员
|
|
|
-function delUser(item:any) {
|
|
|
- operationForm.value=item.operationData.row
|
|
|
+function delUser(item: any) {
|
|
|
+ operationForm.value = item
|
|
|
api.userApi
|
|
|
.checkChangeDept({
|
|
|
userId: operationForm.value.userId,
|
|
|
@@ -640,23 +568,23 @@ function delUser(item:any) {
|
|
|
confirmButtonText: "确认删除",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center:true
|
|
|
+ center: true
|
|
|
}).then((action) => {
|
|
|
- if(action === 'confirm') {
|
|
|
+ if (action === 'confirm') {
|
|
|
api.userApi
|
|
|
.userDelete({
|
|
|
ids: [operationForm.value.id],
|
|
|
|
|
|
})
|
|
|
.then((res: any) => {
|
|
|
- if(res.code==200){
|
|
|
+ if (res.code == 200) {
|
|
|
ElMessage.success(res.msg)
|
|
|
getUserList()
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- // console.log(123);
|
|
|
- })
|
|
|
+ // console.log(123);
|
|
|
+ })
|
|
|
.catch(() => {
|
|
|
ElMessage.warning("用户取消操作");
|
|
|
});
|
|
|
@@ -671,26 +599,26 @@ function delsUser() {
|
|
|
confirmButtonText: "确认删除",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center:true
|
|
|
+ center: true
|
|
|
}).then((action) => {
|
|
|
- if(action === 'confirm') {
|
|
|
+ if (action === 'confirm') {
|
|
|
api.userApi
|
|
|
.userDelete({
|
|
|
ids: checkTableIdList.value,
|
|
|
|
|
|
})
|
|
|
.then((res: any) => {
|
|
|
- if(res.code==200){
|
|
|
+ if (res.code == 200) {
|
|
|
ElMessage.success(res.msg)
|
|
|
getUserList()
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- // console.log(123);
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- ElMessage.warning("用户取消操作");
|
|
|
- });
|
|
|
+ // console.log(123);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ ElMessage.warning("用户取消操作");
|
|
|
+ });
|
|
|
|
|
|
|
|
|
}
|
|
|
@@ -716,11 +644,11 @@ function confirmTransfer() {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-const leave=ref(false)
|
|
|
-function resign(item:any) {
|
|
|
+const leave = ref(false)
|
|
|
+function resign(item: any) {
|
|
|
// console.log(123)
|
|
|
- operationForm.value=item.operationData.row
|
|
|
- leave.value=true
|
|
|
+ operationForm.value = item
|
|
|
+ leave.value = true
|
|
|
api.userApi
|
|
|
.getTransferInfo({
|
|
|
userId: operationForm.value.userId,
|
|
|
@@ -736,24 +664,24 @@ function resign(item:any) {
|
|
|
confirmButtonText: "确认",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center:true
|
|
|
+ center: true
|
|
|
}).then((action) => {
|
|
|
- if(action === 'confirm') {
|
|
|
+ if (action === 'confirm') {
|
|
|
api.userApi
|
|
|
.userQuitApply({
|
|
|
- userId:operationForm.value.userId,
|
|
|
+ userId: operationForm.value.userId,
|
|
|
})
|
|
|
.then((res: any) => {
|
|
|
- if(res.code==200){
|
|
|
+ if (res.code == 200) {
|
|
|
ElMessage.success(res.msg)
|
|
|
getUserList()
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- ElMessage.warning("用户取消操作");
|
|
|
- });
|
|
|
+ .catch(() => {
|
|
|
+ ElMessage.warning("用户取消操作");
|
|
|
+ });
|
|
|
} else {
|
|
|
ElMessage.warning("当前用户有资源未转移,请转移后执行离职操作");
|
|
|
// dialogVisible.value = true;
|
|
|
@@ -764,68 +692,29 @@ function resign(item:any) {
|
|
|
|
|
|
//批量设置负责人
|
|
|
//设置负责人弹框
|
|
|
-const checkTableIdList=ref([])
|
|
|
+const checkTableIdList = ref([])
|
|
|
//表格选择事件
|
|
|
-function selectAllChange(list:any){
|
|
|
|
|
|
- checkTableIdList.value=list
|
|
|
-}
|
|
|
-
|
|
|
-function selectChange(list:any){
|
|
|
-console.log("🚀 ~ selectChange ~ list:", list)
|
|
|
+function selectChange(list: any) {
|
|
|
|
|
|
- checkTableIdList.value=list
|
|
|
+ checkTableIdList.value = list
|
|
|
}
|
|
|
|
|
|
-const deptIdList=ref([])
|
|
|
+const deptIdList = ref([])
|
|
|
|
|
|
-const title=ref('')
|
|
|
-function manySetDeptUser(){
|
|
|
- title.value='设置负责人'
|
|
|
+const title = ref('')
|
|
|
+function manySetDeptUser() {
|
|
|
+ title.value = '设置负责人'
|
|
|
|
|
|
- deptIdList.value=checkTableIdList.value
|
|
|
- deptDialogVisible.value=true
|
|
|
+ deptIdList.value = checkTableIdList.value
|
|
|
+ deptDialogVisible.value = true
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
</script>
|
|
|
-<style lang="scss" scoped>、
|
|
|
-:deep(.date-picker-custom.el-input__inner){
|
|
|
- display: flex;
|
|
|
- flex-direction: row-reverse;
|
|
|
-}
|
|
|
-:deep(.table-title-btn){
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- >div{
|
|
|
- display: flex;
|
|
|
- }
|
|
|
-}
|
|
|
-.member {
|
|
|
- background: #fff;
|
|
|
- width: 100%;
|
|
|
- height: calc(100vh - 120px);
|
|
|
- // height: 100%;
|
|
|
- // padding: 20px;
|
|
|
- box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
- .member-tree {
|
|
|
- flex: none;
|
|
|
- width: 18%;
|
|
|
- padding: 20px;
|
|
|
- box-sizing: border-box;
|
|
|
- border-right: 1px solid #ccc;
|
|
|
- }
|
|
|
- .member-main {
|
|
|
- flex: none;
|
|
|
- width: 80%;
|
|
|
- padding: 20px;
|
|
|
- box-sizing: border-box;
|
|
|
- }
|
|
|
-}
|
|
|
+<style lang="scss" scoped>
|
|
|
:deep(.el-dropdown-link) {
|
|
|
cursor: pointer;
|
|
|
color: var(--el-color-primary);
|
|
|
@@ -833,6 +722,11 @@ function manySetDeptUser(){
|
|
|
align-items: center;
|
|
|
margin-left: 15px;
|
|
|
}
|
|
|
+
|
|
|
+.table {
|
|
|
+ flex: 1; /* 占据剩余空间 */
|
|
|
+ min-width: 0; /* 防止内容溢出时的异常行为 */
|
|
|
+}
|
|
|
.custom-tree-node {
|
|
|
flex: 1;
|
|
|
display: flex;
|