mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 20:51:48 +00:00
(fix) 修复修改密码问题 (#2060)
Co-authored-by: williamhliu <williamhliu@tencent.com>
This commit is contained in:
@@ -137,5 +137,6 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0"
|
"node": ">=16.0.0"
|
||||||
},
|
},
|
||||||
"__npminstall_done": false
|
"__npminstall_done": false,
|
||||||
|
"packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import { Form, Input, message, Modal } from 'antd';
|
|||||||
import { useBoolean } from 'ahooks';
|
import { useBoolean } from 'ahooks';
|
||||||
import { changePassword } from '@/services/user';
|
import { changePassword } from '@/services/user';
|
||||||
import { pick } from 'lodash';
|
import { pick } from 'lodash';
|
||||||
import { encryptPassword, encryptKey } from '@/utils/utils';
|
import { encryptPassword } from '@/utils/utils';
|
||||||
|
import CryptoJS from 'crypto-js';
|
||||||
|
|
||||||
export interface IRef {
|
export interface IRef {
|
||||||
open: () => void;
|
open: () => void;
|
||||||
@@ -14,6 +15,7 @@ const ChangePasswordModal = forwardRef<IRef>((_, ref) => {
|
|||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [open, { setTrue: openModal, setFalse: closeModal }] = useBoolean(false);
|
const [open, { setTrue: openModal, setFalse: closeModal }] = useBoolean(false);
|
||||||
const [confirmLoading, { set: setConfirmLoading }] = useBoolean(false);
|
const [confirmLoading, { set: setConfirmLoading }] = useBoolean(false);
|
||||||
|
const encryptKey = CryptoJS.enc.Utf8.parse('supersonic@2024');
|
||||||
|
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
open: () => {
|
open: () => {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ const ModelFieldForm: React.FC<Props> = ({
|
|||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '英文名称',
|
title: '字段名称',
|
||||||
dataIndex: 'fieldName',
|
dataIndex: 'fieldName',
|
||||||
width: 250,
|
width: 250,
|
||||||
},
|
},
|
||||||
@@ -204,29 +204,8 @@ const ModelFieldForm: React.FC<Props> = ({
|
|||||||
{
|
{
|
||||||
title: '扩展配置',
|
title: '扩展配置',
|
||||||
dataIndex: 'extender',
|
dataIndex: 'extender',
|
||||||
// width: 200,
|
|
||||||
render: (_: any, record: FieldItem) => {
|
render: (_: any, record: FieldItem) => {
|
||||||
const { type } = record;
|
const { type } = record;
|
||||||
// if (type === EnumDataSourceType.PRIMARY) {
|
|
||||||
// return (
|
|
||||||
// <Space>
|
|
||||||
// <Select
|
|
||||||
// style={{ minWidth: 150 }}
|
|
||||||
// value={tagObjectId ? tagObjectId : undefined}
|
|
||||||
// placeholder="请选择所属对象"
|
|
||||||
// onChange={(value) => {
|
|
||||||
// onTagObjectChange?.(value);
|
|
||||||
// }}
|
|
||||||
// options={tagObjectList.map((item: ISemantic.ITagObjectItem) => {
|
|
||||||
// return {
|
|
||||||
// label: item.name,
|
|
||||||
// value: item.id,
|
|
||||||
// };
|
|
||||||
// })}
|
|
||||||
// />
|
|
||||||
// </Space>
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
if (type === EnumDataSourceType.MEASURES) {
|
if (type === EnumDataSourceType.MEASURES) {
|
||||||
return (
|
return (
|
||||||
<Select
|
<Select
|
||||||
|
|||||||
@@ -110,6 +110,10 @@ export const AGG_OPTIONS = [
|
|||||||
label: 'count_distinct',
|
label: 'count_distinct',
|
||||||
value: 'count_distinct',
|
value: 'count_distinct',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'none',
|
||||||
|
value: '',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const DATE_OPTIONS = ['day', 'week', 'month'];
|
export const DATE_OPTIONS = ['day', 'week', 'month'];
|
||||||
|
|||||||
@@ -156,7 +156,9 @@ export const genneratorFormItemList = (itemList: ConfigParametersItem[]) => {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 'password': {
|
case 'password': {
|
||||||
defaultItem = <Input.Password placeholder={placeholder} />;
|
defaultItem = (
|
||||||
|
<Input.Password placeholder={placeholder} visibilityToggle={name !== 'apiKey'} />
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'longText':
|
case 'longText':
|
||||||
|
|||||||
Reference in New Issue
Block a user