新增 CLAUDE.md 文件以提供项目指导,添加 .claudeignore 文件以排除不必要的文件,更新 pom.xml 版本至 3.9.2,修复多个路径遍历和 SQL 注入漏洞,优化字典翻译切面逻辑,增强文件上传和下载的安全性,新增音频文件类型支持,改进动态数据源的安全校验。
This commit is contained in:
@@ -147,7 +147,7 @@ export const getPositionByDepartId = (params) => defHttp.get({ url: Api.getPosit
|
||||
* 根据部门id获取岗位上下级关系
|
||||
* @param params
|
||||
*/
|
||||
export const getRankRelation = (params) => defHttp.get({ url: Api.getRankRelation, params }, { isTransformResponse: false });
|
||||
export const getRankRelation = (params) => defHttp.get({ url: Api.getRankRelation, params,timeout: 2 * 60 * 1000 }, { isTransformResponse: false });
|
||||
|
||||
/**
|
||||
* 根据部门或岗位编码获取通讯录成员
|
||||
@@ -168,4 +168,4 @@ export const updateChangeDepart = (params) => defHttp.put({ url: Api.updateChang
|
||||
*
|
||||
* @param params
|
||||
*/
|
||||
export const getDepartmentHead = (params) => defHttp.get({ url: Api.getDepartmentHead, params });
|
||||
export const getDepartmentHead = (params) => defHttp.get({ url: Api.getDepartmentHead, params });
|
||||
|
||||
@@ -70,11 +70,9 @@
|
||||
import adTextImg from '/@/assets/loginmini/icon/jeecg_ad_text.png';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useDesign } from "/@/hooks/web/useDesign";
|
||||
import { GithubFilled, WechatFilled, DingtalkCircleFilled, createFromIconfontCN } from '@ant-design/icons-vue';
|
||||
import { GithubFilled, WechatFilled, DingtalkCircleFilled } from '@ant-design/icons-vue';
|
||||
import { IconFont } from '/@/utils/iconfont2';
|
||||
|
||||
const IconFont = createFromIconfontCN({
|
||||
scriptUrl: '//at.alicdn.com/t/font_2316098_umqusozousr.js',
|
||||
});
|
||||
const { prefixCls } = useDesign('minilogin');
|
||||
const { t } = useI18n();
|
||||
const qrCodeUrl = ref<string>('');
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<template #renderItem="{ item }">
|
||||
<a-list-item :style="{ background: item?.izTop && item.izTop == 1 ? '#f7f7f7' : 'auto' }">
|
||||
<template #actions>
|
||||
<span>{{formatData(item.sendTime)}}</span>
|
||||
<a-rate class="antd-rate" :value="item.starFlag=='1'?1:0" :count="1" @click="clickStar(item)" style="cursor: pointer" disabled />
|
||||
</template>
|
||||
|
||||
@@ -110,6 +111,7 @@
|
||||
import { useSysMessage, useMessageHref } from './useSysMessage';
|
||||
import {getGloablEmojiIndex, useEmojiHtml} from "/@/components/jeecg/comment/useComment";
|
||||
import { ref, h, watch } from "vue";
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export default {
|
||||
name: 'SysMessageList',
|
||||
@@ -219,6 +221,12 @@
|
||||
//返回list列表为空数据时展示的内容
|
||||
const locale = ref({});
|
||||
|
||||
/**
|
||||
* 日期格式化
|
||||
*/
|
||||
function formatData(data) {
|
||||
return data?dayjs(data).format('YYYY-MM-DD hh:mm'): '';
|
||||
}
|
||||
/**
|
||||
* 未读点击事件
|
||||
*/
|
||||
@@ -272,6 +280,7 @@
|
||||
currentModal,
|
||||
bindParams,
|
||||
locale,
|
||||
formatData,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -460,6 +460,15 @@
|
||||
.ant-modal-body {
|
||||
height: 550px;
|
||||
overflow-y: auto;
|
||||
//update-begin-author:liusq---date:2026-04-23--for: JHHB-1390 【PC端】消息列表展示问题,下面有一块空白,刷新换账号也存在,Edge、Chrome都是这样
|
||||
// 让 .ant-modal-body 作为唯一滚动容器,禁用内部 ModalWrapper ScrollContainer 的 overflow 限制
|
||||
// 否则 ScrollContainer 会自动收缩到内容高度(如3条消息≈200px),导致只有上方小区域可滚动
|
||||
.scrollbar__wrap {
|
||||
overflow-y: visible !important;
|
||||
max-height: none !important;
|
||||
min-height: 0 !important;
|
||||
}
|
||||
//update-end-author:liusq---date:2026-04-23--for: JHHB-1390 【PC端】消息列表展示问题,下面有一块空白,刷新换账号也存在,Edge、Chrome都是这样
|
||||
}
|
||||
.ant-modal {
|
||||
position: absolute;
|
||||
|
||||
@@ -102,7 +102,9 @@
|
||||
*/
|
||||
function handleViewFile(filePath) {
|
||||
if (filePath) {
|
||||
let url = encodeURIComponent(encryptByBase64(filePath));
|
||||
//update-begin-author:scott---date:2026-04-16--for: 【Github #8855】修复文件预览路径处理问题,filePath需要先拼接完整URL再编码
|
||||
let url = encodeURIComponent(encryptByBase64(getFileAccessHttpUrl(filePath)));
|
||||
//update-end-author:scott---date:2026-04-16--for: 【Github #8855】修复文件预览路径处理问题,filePath需要先拼接完整URL再编码
|
||||
let previewUrl = `${glob.viewUrl}?url=` + url;
|
||||
//update-begin-author:liusq---date:2025-12-16--for: JHHB-1139桌面端 文件预览统一修改
|
||||
if($electron.isElectron()){
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import { getToken } from '/@/utils/auth';
|
||||
import {encryptByBase64} from "@/utils/cipher";
|
||||
import { getFileAccessHttpUrl } from '@/utils/common/compUtils';
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
const glob = useGlobSetting();
|
||||
@@ -81,7 +82,9 @@
|
||||
if (record && record.url) {
|
||||
console.log('glob.onlineUrl', glob.viewUrl);
|
||||
// let filePath = encodeURIComponent(record.url);
|
||||
let url = encodeURIComponent(encryptByBase64(record.url));
|
||||
//update-begin-author:scott---date:2026-04-16--for: 【Github #8855】修复文件预览路径处理问题,url需要先拼接完整URL再编码
|
||||
let url = encodeURIComponent(encryptByBase64(getFileAccessHttpUrl(record.url)));
|
||||
//update-end-author:scott---date:2026-04-16--for: 【Github #8855】修复文件预览路径处理问题,url需要先拼接完整URL再编码
|
||||
// //文档采用pdf预览高级模式
|
||||
// if(filePath.endsWith(".pdf") || filePath.endsWith(".doc") || filePath.endsWith(".docx")){
|
||||
// filePath = filePath
|
||||
|
||||
@@ -56,14 +56,14 @@ export const searchUserFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'username',
|
||||
label: '用户账号',
|
||||
component: 'Input',
|
||||
component: 'JInput',
|
||||
colProps: { span: 8 },
|
||||
labelWidth: 74,
|
||||
},
|
||||
{
|
||||
field: 'realname',
|
||||
label: '用户名称',
|
||||
component: 'Input',
|
||||
component: 'JInput',
|
||||
colProps: { span: 8 },
|
||||
labelWidth: 74,
|
||||
},
|
||||
|
||||
176
jeecgboot-vue3/src/views/system/ugroup/SysUgroupList.vue
Normal file
176
jeecgboot-vue3/src/views/system/ugroup/SysUgroupList.vue
Normal file
@@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'system:sys_ugroup:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'system:sys_ugroup:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'system:sys_ugroup:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls"
|
||||
>导入</j-upload-button
|
||||
>
|
||||
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'system:sys_ugroup:deleteBatch'"
|
||||
>批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<SysUgroupModal @register="registerModal" @success="handleSuccess"></SysUgroupModal>
|
||||
<!--角色用户表格-->
|
||||
<GroupUserTable @register="groupUserDrawer" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="system-sysUgroup" setup>
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, searchFormSchema } from './ugroup.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ugroup.api';
|
||||
import SysUgroupModal from './components/SysUgroupModal.vue';
|
||||
import GroupUserTable from './components/GroupUserTable.vue';
|
||||
import { useDrawer } from '/@/components/Drawer';
|
||||
//注册model
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '用户组表',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: true,
|
||||
formConfig: {
|
||||
schemas: searchFormSchema,
|
||||
autoSubmitOnEnter: true,
|
||||
showAdvancedButton: true,
|
||||
},
|
||||
actionColumn: {
|
||||
width: 150,
|
||||
fixed: 'right',
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: '用户组',
|
||||
url: getExportUrl,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess,
|
||||
},
|
||||
});
|
||||
|
||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const [groupUserDrawer, { openDrawer: openGroupUserDrawer }] = useDrawer();
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
openModal(true, {
|
||||
isUpdate: false,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 用户组用户
|
||||
*/
|
||||
function handleUser(record) {
|
||||
openGroupUserDrawer(true, record);
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '用户',
|
||||
onClick: handleUser.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'system:sys_ugroup:edit',
|
||||
},
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'system:sys_ugroup:delete',
|
||||
},
|
||||
];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<BasicDrawer @register="registerBaseDrawer" title="用户组用户" width="800" destroyOnClose>
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" @click="handleSelect"> 添加用户</a-button>
|
||||
<a-dropdown v-if="checkedKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="bx:bx-unlink"></Icon>
|
||||
取消关联
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button
|
||||
>批量操作
|
||||
<Icon icon="ant-design:down-outlined"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!--用户操作抽屉-->
|
||||
<UserDrawer @register="registerDrawer" @success="handleSuccess" />
|
||||
<!--用户选择弹窗-->
|
||||
<UseSelectModal @register="registerModal" @select="selectOk" />
|
||||
</BasicDrawer>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, unref } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { BasicDrawer, useDrawer, useDrawerInner } from '/@/components/Drawer';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import UserDrawer from '../../user/UserDrawer.vue';
|
||||
import UseSelectModal from '@/views/system/role/components/UseSelectModal.vue';
|
||||
import { userList, deleteUserGroup, batchDeleteUserGroup, addUserGroup } from '../ugroup.api';
|
||||
import { userColumns, searchUserFormSchema } from '../ugroup.data';
|
||||
|
||||
const emit = defineEmits(['register', 'hideUserList']);
|
||||
const props = defineProps({
|
||||
disableUserEdit: { type: Boolean, default: false },
|
||||
});
|
||||
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
const groupId = ref('');
|
||||
const [registerBaseDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
|
||||
groupId.value = data.id;
|
||||
setProps({ searchInfo: { groupId: data.id } });
|
||||
reload();
|
||||
});
|
||||
//注册drawer
|
||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
||||
//注册drawer
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
const [registerTable, { reload, updateTableDataRecord, setProps }] = useTable({
|
||||
title: '用户列表',
|
||||
api: userList,
|
||||
columns: userColumns,
|
||||
formConfig: {
|
||||
// 代码逻辑说明: 【QQYUN-5685】3、租户角色下,查询居左显示
|
||||
labelWidth: 60,
|
||||
schemas: searchUserFormSchema,
|
||||
autoSubmitOnEnter: true,
|
||||
},
|
||||
striped: true,
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
clickToRowSelect: false,
|
||||
bordered: true,
|
||||
showIndexColumn: false,
|
||||
// 【issues/1064】列设置的 cacheKey
|
||||
tableSetting: { fullScreen: true, cacheKey: 'group_user_table' },
|
||||
canResize: false,
|
||||
rowKey: 'id',
|
||||
actionColumn: {
|
||||
width: 180,
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
slots: { customRender: 'action' },
|
||||
fixed: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* 选择列配置
|
||||
*/
|
||||
const rowSelection = {
|
||||
type: 'checkbox',
|
||||
columnWidth: 50,
|
||||
selectedRowKeys: checkedKeys,
|
||||
onChange: onSelectChange,
|
||||
};
|
||||
|
||||
/**
|
||||
* 选择事件
|
||||
*/
|
||||
function onSelectChange(selectedRowKeys: (string | number)[], selectionRows) {
|
||||
checkedKeys.value = selectedRowKeys;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
async function handleEdit(record: Recordable) {
|
||||
openDrawer(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteUserGroup({ userId: record.id, groupId: groupId.value }, reload);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDeleteUserGroup({ userIds: checkedKeys.value.join(','), groupId: groupId.value }, () => {
|
||||
// 代码逻辑说明: 【TV360X-1655】批量取消关联之后清空选中记录
|
||||
reload();
|
||||
checkedKeys.value = [];
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess({ isUpdate, values }) {
|
||||
isUpdate ? updateTableDataRecord(values.id, values) : reload();
|
||||
}
|
||||
/**
|
||||
* 选择已有用户
|
||||
*/
|
||||
function handleSelect() {
|
||||
openModal(true);
|
||||
}
|
||||
/**
|
||||
* 添加已有用户
|
||||
*/
|
||||
async function selectOk(val) {
|
||||
await addUserGroup({ groupId: groupId.value, userIdList: val }, reload);
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
ifShow: () => !props.disableUserEdit,
|
||||
},
|
||||
{
|
||||
label: '取消关联',
|
||||
popConfirm: {
|
||||
title: '是否确认取消关联',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/*update-begin---author:wangshuai ---date:20230703 for:【QQYUN-5685】3、租户角色下,查询居左显示*/
|
||||
:deep(.ant-form-item-control-input-content) {
|
||||
text-align: left;
|
||||
}
|
||||
/*update-end---author:wangshuai ---date:20230703 for:【QQYUN-5685】3、租户角色下,查询居左显示*/
|
||||
</style>
|
||||
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :maxHeight="500" :width="800" @ok="handleSubmit">
|
||||
<BasicForm @register="registerForm" name="SysUgroupForm" />
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, unref, reactive } from 'vue';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import { BasicForm, useForm } from '/@/components/Form/index';
|
||||
import { formSchema } from '../ugroup.data';
|
||||
import { saveOrUpdate } from '../ugroup.api';
|
||||
// Emits声明
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
const isUpdate = ref(true);
|
||||
const isDetail = ref(false);
|
||||
//表单配置
|
||||
const [registerForm, { setProps, resetFields, setFieldsValue, validate, scrollToField }] = useForm({
|
||||
labelWidth: 150,
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
baseColProps: { span: 24 },
|
||||
baseRowStyle: { padding: '0 20px' },
|
||||
});
|
||||
//表单赋值
|
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||
//重置表单
|
||||
await resetFields();
|
||||
setModalProps({ confirmLoading: false, showCancelBtn: !!data?.showFooter, showOkBtn: !!data?.showFooter });
|
||||
isUpdate.value = !!data?.isUpdate;
|
||||
isDetail.value = !!data?.showFooter;
|
||||
if (unref(isUpdate)) {
|
||||
//表单赋值
|
||||
await setFieldsValue({
|
||||
...data.record,
|
||||
});
|
||||
}
|
||||
// 隐藏底部时禁用整个表单
|
||||
setProps({ disabled: !data?.showFooter });
|
||||
});
|
||||
//设置标题
|
||||
const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(isDetail) ? '详情' : '编辑'));
|
||||
//表单提交事件
|
||||
async function handleSubmit() {
|
||||
try {
|
||||
let values = await validate();
|
||||
setModalProps({ confirmLoading: true });
|
||||
//提交表单
|
||||
await saveOrUpdate(values, isUpdate.value);
|
||||
//关闭弹窗
|
||||
closeModal();
|
||||
//刷新列表
|
||||
emit('success');
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
} finally {
|
||||
setModalProps({ confirmLoading: false });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** 时间和数字输入框样式 */
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.ant-calendar-picker) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
107
jeecgboot-vue3/src/views/system/ugroup/ugroup.api.ts
Normal file
107
jeecgboot-vue3/src/views/system/ugroup/ugroup.api.ts
Normal file
@@ -0,0 +1,107 @@
|
||||
import {defHttp} from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
import { Modal } from 'ant-design-vue';
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/sys/ugroup/list',
|
||||
save='/sys/ugroup/add',
|
||||
edit='/sys/ugroup/edit',
|
||||
deleteOne = '/sys/ugroup/delete',
|
||||
deleteBatch = '/sys/ugroup/deleteBatch',
|
||||
importExcel = '/sys/ugroup/importExcel',
|
||||
exportXls = '/sys/ugroup/exportXls',
|
||||
|
||||
userList = '/sys/user/groupUserList',
|
||||
deleteUserGroup = '/sys/user/deleteGroupUser',
|
||||
batchDeleteUserGroup = '/sys/user/deleteUserGroupBatch',
|
||||
addUserGroup = '/sys/user/addSysUserGroup',
|
||||
}
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) =>
|
||||
defHttp.get({url: Api.list, params});
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate,showTip = true) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({url: url, params},{successMessageMode:showTip?'success':'none'});
|
||||
}
|
||||
/**
|
||||
* 角色列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const userList = (params) => defHttp.get({ url: Api.userList, params });
|
||||
/**
|
||||
* 删除角色用户
|
||||
*/
|
||||
export const deleteUserGroup = (params, handleSuccess) => {
|
||||
return defHttp.delete({ url: Api.deleteUserGroup, params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 批量删除角色用户
|
||||
* @param params
|
||||
*/
|
||||
export const batchDeleteUserGroup = (params, handleSuccess) => {
|
||||
Modal.confirm({
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({ url: Api.batchDeleteUserGroup, params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 添加已有用户
|
||||
*/
|
||||
export const addUserGroup = (params, handleSuccess) => {
|
||||
return defHttp.post({ url: Api.addUserGroup, params }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
};
|
||||
93
jeecgboot-vue3/src/views/system/ugroup/ugroup.data.ts
Normal file
93
jeecgboot-vue3/src/views/system/ugroup/ugroup.data.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
import { BasicColumn } from '/@/components/Table';
|
||||
import { FormSchema } from '/@/components/Table';
|
||||
// 名称最大长度
|
||||
export const NAME_MAX_LENGTH = 40;
|
||||
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '用户组名称',
|
||||
align: 'center',
|
||||
dataIndex: 'groupName',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
dataIndex: 'createTime',
|
||||
},
|
||||
];
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
label: '用户组名称',
|
||||
field: 'groupName',
|
||||
component: 'JInput',
|
||||
},
|
||||
];
|
||||
|
||||
//表单数据
|
||||
export const formSchema: FormSchema[] = [
|
||||
{
|
||||
label: '用户组名称',
|
||||
field: 'groupName',
|
||||
component: 'Input',
|
||||
dynamicRules() {
|
||||
return [
|
||||
{required: true, message: '请输入用户组名称'},
|
||||
{
|
||||
max: NAME_MAX_LENGTH,
|
||||
message: `名称长度不能超过${NAME_MAX_LENGTH}个字符`,
|
||||
},
|
||||
];
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '描述',
|
||||
field: 'description',
|
||||
component: 'InputTextArea',
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
field: 'id',
|
||||
component: 'Input',
|
||||
show: false,
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* 角色用户搜索form
|
||||
*/
|
||||
export const searchUserFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'username',
|
||||
label: '用户账号',
|
||||
component: 'Input',
|
||||
colProps: { span: 8 },
|
||||
labelWidth: 74,
|
||||
},
|
||||
{
|
||||
field: 'realname',
|
||||
label: '用户名称',
|
||||
component: 'Input',
|
||||
colProps: { span: 8 },
|
||||
labelWidth: 74,
|
||||
},
|
||||
];
|
||||
/**
|
||||
* 角色用户Columns
|
||||
*/
|
||||
export const userColumns = [
|
||||
{
|
||||
title: '用户账号',
|
||||
dataIndex: 'username',
|
||||
},
|
||||
{
|
||||
title: '用户姓名',
|
||||
dataIndex: 'realname',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status_dictText',
|
||||
width: 80,
|
||||
},
|
||||
];
|
||||
@@ -38,7 +38,8 @@
|
||||
import { bindThirdAppAccount, deleteThirdAccount, getThirdAccountByUserId } from './UserSetting.api';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { DingtalkCircleFilled, createFromIconfontCN, WechatFilled } from '@ant-design/icons-vue';
|
||||
import { DingtalkCircleFilled, WechatFilled } from '@ant-design/icons-vue';
|
||||
import { IconFont } from '/@/utils/iconfont2';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
@@ -46,9 +47,6 @@
|
||||
|
||||
const { prefixCls } = useDesign('j-user-tenant-setting-container');
|
||||
|
||||
const IconFont = createFromIconfontCN({
|
||||
scriptUrl: '//at.alicdn.com/t/font_2316098_umqusozousr.js',
|
||||
});
|
||||
const userStore = useUserStore();
|
||||
|
||||
//绑定微信的数据
|
||||
|
||||
Reference in New Issue
Block a user