新增入股任务选择负责人

This commit is contained in:
weipengfei 2023-08-29 09:58:09 +08:00
parent 1b41b00dd9
commit ac9da403d7
3 changed files with 36 additions and 21 deletions

View File

@ -20,3 +20,8 @@ export function getUserInfo() {
export function setUserInfo(params: any) {
return request.post({ url: '/auth.admin/editSelf', params })
}
// 编辑管理员信息
export function getUserList(params: any) {
return request.get({ url: '/user.user/lists', params })
}

View File

@ -1,11 +1,11 @@
<template>
<div>
<el-card class="!border-none" shadow="never">
<!-- <el-card class="!border-none" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="负责人名称" prop="name">
<el-input
class="w-[280px]"
v-model="queryParams.name"
v-model="queryParams.nickname"
clearable
placeholder="请输入负责人名称"
/>
@ -26,35 +26,35 @@
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</el-card> -->
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<div class="mt-4">
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
<el-table-column label="账号" prop="account" min-width="120" />
<el-table-column label="名称" prop="name" min-width="100" />
<el-table-column label="头像" prop="avatar" min-width="80">
<template #default="{ row }">
<img style="width: 50px; height: 50px" :src="row.avatar" />
</template>
</el-table-column>
<el-table-column label="名称" prop="nickname" min-width="100" />
<el-table-column
label="角色"
prop="role_name"
label="电话"
prop="mobile"
min-width="140"
show-tooltip-when-overflow
/>
<el-table-column
label="部门"
prop="dept_name"
min-width="100"
label="公司"
prop="company.company_name"
min-width="160"
show-tooltip-when-overflow
/>
<el-table-column
label="创建时间"
prop="create_time"
min-width="180"
/>
<el-table-column
<!-- <el-table-column
label="最近登录时间"
prop="login_time"
min-width="180"
/>
<el-table-column label="最近登录IP" prop="login_ip" min-width="120" />
<el-table-column label="最近登录IP" prop="login_ip" min-width="120" /> -->
</el-table>
</div>
<div class="flex mt-4 justify-end">
@ -71,6 +71,7 @@ import { useDictData, useDictOptions } from "@/hooks/useDictOptions";
import { adminLists } from "@/api/perms/admin";
import Popup from "@/components/popup/index.vue";
import { defineEmits } from "vue";
import { getUserList } from "@/api/user";
const { optionsData } = useDictOptions<{
role: any[];
}>({
@ -80,9 +81,15 @@ const { optionsData } = useDictOptions<{
});
//
const queryParams = reactive({
name: "",
role_id: "",
company_id: "",
});
const props = defineProps({
company_id: {
type: String || Number,
defaults: 0,
},
});
queryParams.company_id = props.company_id;
//
const emits = defineEmits(["customEvent"]);
@ -94,7 +101,7 @@ const handleCurrentChange = (value: any) => {
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: adminLists,
fetchFun: getUserList,
params: queryParams,
});

View File

@ -185,7 +185,10 @@
title="选择负责人"
width="60%"
>
<personnelPopup @custom-event="changePersonner"></personnelPopup>
<personnelPopup
@custom-event="changePersonner"
:company_id="formData.company_id"
></personnelPopup>
</el-dialog>
</popup>
</div>
@ -408,7 +411,7 @@ const personnelShow = ref(false);
const personnelRef = shallowRef<InstanceType<typeof personnelPopup>>();
const changePersonner = (e: any) => {
formData.task_admin = e.id;
formData.task_admin_name = e.name;
formData.task_admin_name = e.nickname;
personnelShow.value = false;
};