Commit ad46a806 authored by TZW's avatar TZW

1

parent 9543de12
...@@ -218,6 +218,7 @@ function SiderMenu({ logo, collapsed, onCollapse, fixSiderbar, theme, isMobile, ...@@ -218,6 +218,7 @@ function SiderMenu({ logo, collapsed, onCollapse, fixSiderbar, theme, isMobile,
selectedKeys={[location.pathname]} selectedKeys={[location.pathname]}
collapsed={collapsed.toString()} collapsed={collapsed.toString()}
onClick={async ({ item, key, keyPath, domEvent }) => { onClick={async ({ item, key, keyPath, domEvent }) => {
console.log('key', key, item.key);
if (key == '0') { if (key == '0') {
changealive(!alive); changealive(!alive);
return; return;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56 * @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-15 09:49:39 * @Last Modified time: 2022-12-15 18:38:16
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -1434,7 +1434,7 @@ function Model(props) { ...@@ -1434,7 +1434,7 @@ function Model(props) {
{ {
title: '上传文件(上限为5个)', title: '上传文件(上限为5个)',
key: 'urlIds ', key: 'urlIds ',
valueType: 'uploadDragger', valueType: 'uploadImage',
// colProps: { span: 24 }, // colProps: { span: 24 },
fieldProps: { fieldProps: {
limit: 5, limit: 5,
...@@ -1467,7 +1467,7 @@ function Model(props) { ...@@ -1467,7 +1467,7 @@ function Model(props) {
{ {
title: '上传文件(上限为5个)', title: '上传文件(上限为5个)',
key: 'urlIds ', key: 'urlIds ',
valueType: 'uploadDragger', valueType: 'uploadImage',
formItemProps: { formItemProps: {
rules: [ rules: [
{ {
......
...@@ -2,7 +2,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -2,7 +2,7 @@ import { doFetch } from '@/utils/doFetch';
import { Image } from 'antd'; import { Image } from 'antd';
import fieldsDetail from '@/utils/fieldsDetail'; import fieldsDetail from '@/utils/fieldsDetail';
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
function getcolumns(setdrawer) { function getcolumns(setdrawer, options) {
return [ return [
{ {
title: '用户名', title: '用户名',
...@@ -10,6 +10,8 @@ function getcolumns(setdrawer) { ...@@ -10,6 +10,8 @@ function getcolumns(setdrawer) {
width: 120, width: 120,
key: 'username', key: 'username',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
valueType: 'select',
options,
}, },
{ {
title: '姓名', title: '姓名',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44 * @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-15 17:19:25 * @Last Modified time: 2022-12-15 18:06:50
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -16,6 +16,7 @@ import { doFetch } from '@/utils/doFetch'; ...@@ -16,6 +16,7 @@ import { doFetch } from '@/utils/doFetch';
import { message, AutoComplete } from 'antd'; import { message, AutoComplete } from 'antd';
import ExtendField from '@/components/ExtendField'; import ExtendField from '@/components/ExtendField';
import { useModel } from 'umi'; import { useModel } from 'umi';
import { useRequest } from 'ahooks';
function User(props) { function User(props) {
const { initialState, loading, error, refresh, setInitialState } = useModel('@@initialState'); const { initialState, loading, error, refresh, setInitialState } = useModel('@@initialState');
...@@ -139,8 +140,18 @@ function User(props) { ...@@ -139,8 +140,18 @@ function User(props) {
); );
}; };
const [username, setusername] = useState(null);
const { data } = useRequest(async () => {
let res = await doFetch({
url: '/auth/sysUser/queryLikeIotUsername',
params: { username: '' },
});
return res?.data?.dataList;
});
const columns = useMemo(() => { const columns = useMemo(() => {
let defcolumn = getcolumns(setDrawer); let defcolumn = getcolumns(setDrawer, data);
return defcolumn.concat({ return defcolumn.concat({
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
......
...@@ -42,7 +42,7 @@ export function getMenu(params) { ...@@ -42,7 +42,7 @@ export function getMenu(params) {
/*---------------菜单收藏-------------------*/ /*---------------菜单收藏-------------------*/
export function collectPerms(params) { export function collectPerms(params) {
return request(`/ngic-auth/sysUserPermission/collectPerm`, { return request(`/emspro/auth/sysUserPermission/collectPerm`, {
method: 'POST', method: 'POST',
data: params, data: params,
}); });
...@@ -50,14 +50,14 @@ export function collectPerms(params) { ...@@ -50,14 +50,14 @@ export function collectPerms(params) {
/*---------------取消菜单收藏-------------------*/ /*---------------取消菜单收藏-------------------*/
export function cancelCollectPerms(params) { export function cancelCollectPerms(params) {
return request(`/ngic-auth/sysUserPermission/cancelCollectPerm`, { return request(`/emspro/auth/sysUserPermission/cancelCollectPerm`, {
method: 'POST', method: 'POST',
data: params, data: params,
}); });
} }
/*---------------菜单历史记录-------------------*/ /*---------------菜单历史记录-------------------*/
export function mtosave(params) { export function mtosave(params) {
return request(`/ngic-auth/sysUserVisitPermission/save`, { return request(`/emspro/auth/sysUserVisitPermission/save`, {
method: 'POST', method: 'POST',
data: params, data: params,
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment