Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev
This commit is contained in:
commit
30fcf9133f
@ -2,7 +2,8 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="state.visible"
|
v-model="state.visible"
|
||||||
draggable
|
draggable
|
||||||
title="文件导入"
|
append-to-body
|
||||||
|
:title="title"
|
||||||
width="50%"
|
width="50%"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
@ -16,7 +17,7 @@
|
|||||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||||
<div class="el-upload__text">将文件放在此处或单击上传</div>
|
<div class="el-upload__text">将文件放在此处或单击上传</div>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
<div class="el-upload__tip">excel文件大小小于500kb</div>
|
<div class="el-upload__tip">仅允许导入xls、xlsx格式文件,excel文件大小小于500kb</div>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -29,6 +30,10 @@
|
|||||||
import { reactive, ref, shallowRef } from 'vue';
|
import { reactive, ref, shallowRef } from 'vue';
|
||||||
import { isEmpty } from '@/utils';
|
import { isEmpty } from '@/utils';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '文件导入',
|
||||||
|
},
|
||||||
tips: {
|
tips: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '提示:导入前请先下载模板填写信息,然后再导入!',
|
default: '提示:导入前请先下载模板填写信息,然后再导入!',
|
||||||
|
@ -1 +1,167 @@
|
|||||||
import request from '@/utils/axios';
|
import request from '@/utils/axios';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 列表
|
||||||
|
*/
|
||||||
|
export function GetEntityList(params = {}) {
|
||||||
|
return request('/system/user/list', {
|
||||||
|
method: 'GET',
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 新增
|
||||||
|
*/
|
||||||
|
export function AddEntity(data = {}) {
|
||||||
|
return request('/system/user', {
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 修改
|
||||||
|
*/
|
||||||
|
export function UpdateEntity(data = {}) {
|
||||||
|
return request('/system/user', {
|
||||||
|
method: 'PUT',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 删除
|
||||||
|
*/
|
||||||
|
export function DeleteEntity(params = {}) {
|
||||||
|
return request(`/system/user/${params.id}`, {
|
||||||
|
method: 'DELETE',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 导入
|
||||||
|
*/
|
||||||
|
export function ImportEntity(data = {}) {
|
||||||
|
return request('/system/user/importData', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: { 'Content-Type': 'multipart/form-data' },
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 导出
|
||||||
|
*/
|
||||||
|
export function ExportEntity(params = {}) {
|
||||||
|
return request('/system/user/export', {
|
||||||
|
method: 'POST',
|
||||||
|
params,
|
||||||
|
responseType: 'blob',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 状态修改
|
||||||
|
*/
|
||||||
|
export function UpdateStatus(data = {}) {
|
||||||
|
return request('/system/user/changeStatus', {
|
||||||
|
method: 'PUT',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 信息
|
||||||
|
*/
|
||||||
|
export function GetUser(id) {
|
||||||
|
return request(`/system/user/${id}`, {
|
||||||
|
method: 'GET',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 用户密码重置
|
||||||
|
*/
|
||||||
|
export function ResetUserPwd(data = {}) {
|
||||||
|
return request(`/system/user/resetPwd`, {
|
||||||
|
method: 'PUT',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 查询用户个人信息
|
||||||
|
*/
|
||||||
|
export function GetUserProfile() {
|
||||||
|
return request(`/system/user/profile`, {
|
||||||
|
method: 'GET',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 修改用户个人信息
|
||||||
|
*/
|
||||||
|
export function UpdateUserProfile(data = {}) {
|
||||||
|
return request(`/system/user/profile`, {
|
||||||
|
method: 'PUT',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 用户密码重置
|
||||||
|
*/
|
||||||
|
export function UpdateUserPwd(data = {}) {
|
||||||
|
return request(`/system/user/profile/updatePwd`, {
|
||||||
|
method: 'PUT',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 用户头像上传
|
||||||
|
*/
|
||||||
|
export function UploadAvatar(data = {}) {
|
||||||
|
return request(`/system/user/profile/avatar`, {
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 查询授权角色
|
||||||
|
*/
|
||||||
|
export function GetAuthRole(id) {
|
||||||
|
return request(`/system/user/authRole/${id}`, {
|
||||||
|
method: 'GET',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 保存授权角色
|
||||||
|
*/
|
||||||
|
export function UpdateAuthRole(params = {}) {
|
||||||
|
return request('/system/user/authRole', {
|
||||||
|
method: 'PUT',
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 查询部门
|
||||||
|
*/
|
||||||
|
export function GetDeptList() {
|
||||||
|
return request('/system/dept/list', {
|
||||||
|
method: 'GET',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Title: 查询部门下拉树结构
|
||||||
|
*/
|
||||||
|
export function GetDeptTreeSelect() {
|
||||||
|
return request('/system/user/deptTree', {
|
||||||
|
method: 'GET',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
BIN
sub-government-affairs-service/src/assets/template/用户-导入模板.xlsx
Normal file
BIN
sub-government-affairs-service/src/assets/template/用户-导入模板.xlsx
Normal file
Binary file not shown.
@ -20,6 +20,12 @@ export default [
|
|||||||
name: 'system-dict',
|
name: 'system-dict',
|
||||||
meta: { title: '字典管理', icon: 'Document' },
|
meta: { title: '字典管理', icon: 'Document' },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/sub-government-affairs-service/system-menu',
|
||||||
|
component: () => import('@/views/system/menu/index.vue'),
|
||||||
|
name: 'system-menu',
|
||||||
|
meta: { title: '菜单管理', icon: 'Document' },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/sub-government-affairs-service/system-role',
|
path: '/sub-government-affairs-service/system-role',
|
||||||
component: () => import('@/views/system/role/index.vue'),
|
component: () => import('@/views/system/role/index.vue'),
|
||||||
@ -34,10 +40,10 @@ export default [
|
|||||||
hidden: true,
|
hidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/sub-government-affairs-service/system-menu',
|
path: '/sub-government-affairs-service/system-user',
|
||||||
component: () => import('@/views/system/menu/index.vue'),
|
component: () => import('@/views/system/user/index.vue'),
|
||||||
name: 'system-menu',
|
name: 'system-user',
|
||||||
meta: { title: '菜单管理', icon: 'Document' },
|
meta: { title: '用户管理', icon: 'Document' },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
* @Author: zenghua.wang
|
* @Author: zenghua.wang
|
||||||
* @Date: 2022-02-23 21:12:37
|
* @Date: 2022-02-23 21:12:37
|
||||||
* @LastEditors: zenghua.wang
|
* @LastEditors: zenghua.wang
|
||||||
* @LastEditTime: 2025-04-02 14:21:56
|
* @LastEditTime: 2025-04-09 09:53:18
|
||||||
*/
|
*/
|
||||||
import lodash from 'lodash';
|
import lodash, { deburr } from 'lodash';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { Base64 } from 'js-base64';
|
import { Base64 } from 'js-base64';
|
||||||
|
|
||||||
@ -303,6 +303,7 @@ export const getTree = (data, id = 'id', parentId = 'parentId', children = 'chil
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const getParentIds = (treeData, targetId, id = 'id', children = 'children') => {
|
export const getParentIds = (treeData, targetId, id = 'id', children = 'children') => {
|
||||||
|
if (isEmpty(targetId)) return [];
|
||||||
const parentMap = {};
|
const parentMap = {};
|
||||||
function buildParentMap(node, parentId = null) {
|
function buildParentMap(node, parentId = null) {
|
||||||
if (node[id]) {
|
if (node[id]) {
|
||||||
|
@ -59,7 +59,7 @@ const state = reactive({
|
|||||||
rowKey: 'userId',
|
rowKey: 'userId',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: '用户名称',
|
label: '登录名',
|
||||||
prop: 'userName',
|
prop: 'userName',
|
||||||
search: true,
|
search: true,
|
||||||
rules: {
|
rules: {
|
||||||
@ -69,7 +69,7 @@ const state = reactive({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '用户昵称',
|
label: '用户名称',
|
||||||
prop: 'nickName',
|
prop: 'nickName',
|
||||||
rules: {
|
rules: {
|
||||||
required: true,
|
required: true,
|
||||||
@ -99,7 +99,7 @@ const state = reactive({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '手机',
|
label: '手机号',
|
||||||
prop: 'phonenumber',
|
prop: 'phonenumber',
|
||||||
search: true,
|
search: true,
|
||||||
rules: {
|
rules: {
|
||||||
@ -111,6 +111,7 @@ const state = reactive({
|
|||||||
{
|
{
|
||||||
label: '邮箱',
|
label: '邮箱',
|
||||||
prop: 'email',
|
prop: 'email',
|
||||||
|
hide: true,
|
||||||
rules: {
|
rules: {
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入',
|
message: '请输入',
|
||||||
|
@ -71,7 +71,7 @@ const state = reactive({
|
|||||||
rowKey: 'userId',
|
rowKey: 'userId',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
label: '用户名称',
|
label: '登录名',
|
||||||
prop: 'userName',
|
prop: 'userName',
|
||||||
search: true,
|
search: true,
|
||||||
rules: {
|
rules: {
|
||||||
@ -81,7 +81,7 @@ const state = reactive({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '用户昵称',
|
label: '用户名称',
|
||||||
prop: 'nickName',
|
prop: 'nickName',
|
||||||
rules: {
|
rules: {
|
||||||
required: true,
|
required: true,
|
||||||
@ -111,7 +111,7 @@ const state = reactive({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '手机',
|
label: '手机号',
|
||||||
prop: 'phonenumber',
|
prop: 'phonenumber',
|
||||||
search: true,
|
search: true,
|
||||||
rules: {
|
rules: {
|
||||||
@ -123,6 +123,7 @@ const state = reactive({
|
|||||||
{
|
{
|
||||||
label: '邮箱',
|
label: '邮箱',
|
||||||
prop: 'email',
|
prop: 'email',
|
||||||
|
hide: true,
|
||||||
rules: {
|
rules: {
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入',
|
message: '请输入',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user