eli-video-interview 1.2.32 → 1.2.34-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/esm/components/Charts/ReportPie.js +5 -1
  2. package/esm/modules/ai-ability/Root.d.ts +3 -2
  3. package/esm/modules/ai-ability/Root.js +10 -9
  4. package/esm/modules/ai-ability/components/AbilityFormItem/index.js +2 -2
  5. package/esm/modules/ai-ability/components/AddAbility/index.js +22 -14
  6. package/esm/modules/ai-ability/components/UpdateAbility/index.js +9 -3
  7. package/esm/modules/ai-ability/index.d.ts +3 -2
  8. package/esm/modules/ai-ability/index.js +13 -2
  9. package/esm/modules/ai-ability/interface.d.ts +10 -0
  10. package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +1 -1
  11. package/esm/modules/ai-question/components/QuestionModel/Item.d.ts +1 -1
  12. package/esm/modules/ai-question/components/QuestionModel/Item.js +6 -4
  13. package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +1 -1
  14. package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.d.ts +1 -1
  15. package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.js +6 -5
  16. package/esm/modules/ai-report/components/WorkPlaces/index.js +2 -1
  17. package/esm/services/ai-ability.d.ts +1 -0
  18. package/esm/services/ai-ability.js +2 -0
  19. package/lib/components/Charts/ReportPie.js +5 -1
  20. package/lib/modules/ai-ability/Root.d.ts +3 -2
  21. package/lib/modules/ai-ability/Root.js +10 -9
  22. package/lib/modules/ai-ability/components/AbilityFormItem/index.js +2 -2
  23. package/lib/modules/ai-ability/components/AddAbility/index.js +21 -13
  24. package/lib/modules/ai-ability/components/UpdateAbility/index.js +9 -3
  25. package/lib/modules/ai-ability/index.d.ts +3 -2
  26. package/lib/modules/ai-ability/index.js +13 -2
  27. package/lib/modules/ai-ability/interface.d.ts +10 -0
  28. package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +1 -1
  29. package/lib/modules/ai-question/components/QuestionModel/Item.d.ts +1 -1
  30. package/lib/modules/ai-question/components/QuestionModel/Item.js +6 -4
  31. package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +1 -1
  32. package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.d.ts +1 -1
  33. package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.js +6 -5
  34. package/lib/modules/ai-report/components/WorkPlaces/index.js +2 -1
  35. package/lib/services/ai-ability.d.ts +1 -0
  36. package/lib/services/ai-ability.js +4 -1
  37. package/package.json +1 -1
@@ -25,8 +25,12 @@ import { levelMapping } from './const';
25
25
  import Chart from "./Chart";
26
26
  var formateTitle = function (originalTitle) {
27
27
  var regex = /(\d+?)[.](.+)/;
28
- if (!regex.test(originalTitle))
28
+ if (!regex.test(originalTitle)) {
29
+ if (originalTitle.length > 7) {
30
+ originalTitle = "".concat(originalTitle.slice(0, 6), "...");
31
+ }
29
32
  return originalTitle;
33
+ }
30
34
  var _a = originalTitle.match(regex), no = _a[1];
31
35
  return "\u7B2C".concat(no, "\u9898");
32
36
  };
@@ -1,3 +1,4 @@
1
- import { FC } from 'react';
2
- declare const AiAbilityRoot: FC;
1
+ import { AiAbilityProps } from './interface';
2
+ import React from 'react';
3
+ declare const AiAbilityRoot: React.FC<AiAbilityProps>;
3
4
  export default AiAbilityRoot;
@@ -54,16 +54,17 @@ import { useRequest, useSetState } from 'ahooks';
54
54
  import dayjs from 'dayjs';
55
55
  import { AddIcon, Box, Button, confirm, DeleteIcon, DocumentIcon, Header, Link, Message, Table, Tooltip } from 'fbm-ui';
56
56
  import { useCallback, useState } from 'react';
57
- var AiAbilityRoot = function () {
58
- var _a = useSetState({
57
+ var AiAbilityRoot = function (_a) {
58
+ var _b = _a.ablilityNameLength, ablilityNameLength = _b === void 0 ? 30 : _b;
59
+ var _c = useSetState({
59
60
  name: '',
60
61
  token: '',
61
62
  type: 3,
62
63
  isWorkplace: false,
63
- }), state = _a[0], setState = _a[1];
64
- var _b = useState(false), AddAbilityOpen = _b[0], setAddAbilityOpen = _b[1];
65
- var _c = useState(false), UpdateAbilityOpen = _c[0], setUpdateAbilityOpen = _c[1];
66
- var _d = useRequest(PostQuestionCollectionList), data = _d.data, getList = _d.run, listLoading = _d.loading;
64
+ }), state = _c[0], setState = _c[1];
65
+ var _d = useState(false), AddAbilityOpen = _d[0], setAddAbilityOpen = _d[1];
66
+ var _e = useState(false), UpdateAbilityOpen = _e[0], setUpdateAbilityOpen = _e[1];
67
+ var _f = useRequest(PostQuestionCollectionList), data = _f.data, getList = _f.run, listLoading = _f.loading;
67
68
  var deleteList = useRequest(PostQuestionCollectionDelete, {
68
69
  manual: true,
69
70
  onSuccess: function () {
@@ -130,7 +131,7 @@ var AiAbilityRoot = function () {
130
131
  label: '最后更新人',
131
132
  render: function (_a) {
132
133
  var cell = _a.cell, row = _a.row;
133
- return _jsx(_Fragment, { children: row.type === 1 ? '-' : cell === null || cell === void 0 ? void 0 : cell.account });
134
+ return _jsx(_Fragment, { children: row.type === 1 ? '-' : (cell === null || cell === void 0 ? void 0 : cell.account) || '-' });
134
135
  },
135
136
  },
136
137
  {
@@ -138,10 +139,10 @@ var AiAbilityRoot = function () {
138
139
  label: '操作',
139
140
  render: function (_a) {
140
141
  var row = _a.row;
141
- return row.type === 1 ? (_jsx(Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: _jsx(Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: _jsx(DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) }))) : (_jsxs(_Fragment, { children: [_jsx(Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: _jsx(Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: _jsx(DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) })), _jsx(Tooltip, __assign({ title: "\u5220\u9664" }, { children: _jsx(Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', cursor: 'pointer' }, text: _jsx(DeleteIcon, {}), onClick: function () { return handleDelete(row); } }) }))] }));
142
+ return row.type === 1 ? (_jsx(Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: _jsx(Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: _jsx(DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) }))) : (_jsxs(Box, __assign({ minWidth: "80px" }, { children: [_jsx(Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: _jsx(Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: _jsx(DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) })), _jsx(Tooltip, __assign({ title: "\u5220\u9664" }, { children: _jsx(Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', cursor: 'pointer' }, text: _jsx(DeleteIcon, {}), onClick: function () { return handleDelete(row); } }) }))] })));
142
143
  },
143
144
  },
144
145
  ];
145
- return (_jsxs(AbilityRoot, { children: [AddAbilityOpen && _jsx(AddAbility, __assign({}, state, { open: AddAbilityOpen, onClose: handleClose, onSuccess: getList })), UpdateAbilityOpen && _jsx(UpdateAbility, __assign({}, state, { open: UpdateAbilityOpen, onClose: handleClose, onSuccess: getList })), _jsx(Header, { title: "\u8003\u5BDF\u80FD\u529B\u7BA1\u7406", renderAction: function () { return (_jsx(Button, __assign({ icon: _jsx(AddIcon, {}), onClick: handleAdd }, { children: "\u65B0\u589E\u80FD\u529B" }))); } }), _jsx(Box, __assign({ mt: 2, border: "1px solid rgba(0, 0, 0, 0.08)", borderRadius: 0.5, overflow: "hidden" }, { children: _jsx(Table, { emptyText: "\u6682\u65E0\u6570\u636E", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns }) }))] }));
146
+ return (_jsxs(AbilityRoot, { children: [AddAbilityOpen && (_jsx(AddAbility, __assign({}, state, { open: AddAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), UpdateAbilityOpen && (_jsx(UpdateAbility, __assign({}, state, { open: UpdateAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), _jsx(Header, { title: "\u8003\u5BDF\u80FD\u529B\u7BA1\u7406", renderAction: function () { return (_jsx(Button, __assign({ icon: _jsx(AddIcon, {}), onClick: handleAdd }, { children: "\u65B0\u589E\u80FD\u529B" }))); } }), _jsx(Box, __assign({ mt: 2, border: "1px solid rgba(0, 0, 0, 0.08)", borderRadius: 0.5, overflow: "hidden" }, { children: _jsx(Table, { emptyText: "\u6682\u65E0\u6570\u636E", nameText: "\u8003\u5BDF\u80FD\u529B", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns }) }))] }));
146
147
  };
147
148
  export default AiAbilityRoot;
@@ -98,7 +98,7 @@ var AbilityFormItem = function (_a) {
98
98
  rows: 3,
99
99
  multiline: true,
100
100
  sx: {
101
- marginBottom: '32px',
101
+ marginBottom: '43px',
102
102
  },
103
103
  });
104
104
  useEffect(function () {
@@ -124,6 +124,6 @@ var AbilityFormItem = function (_a) {
124
124
  });
125
125
  // eslint-disable-next-line react-hooks/exhaustive-deps
126
126
  }, [type, name, token]);
127
- return (_jsxs(Stack, { children: [_jsxs(Stack, __assign({ style: { marginBottom: '18px' }, direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canReplace && (_jsx(Button, __assign({ loading: loading, onClick: handleReplace, variant: "outlined", color: "inherit", size: "small", icon: _jsx(RefreshIcon, {}) }, { children: loading ? '生成中' : '换一换' })))] })), internalMode === 'edit' && (_jsx(Box, __assign({ width: 1, pr: 2 }, { children: _jsx(TextField, __assign({}, nameTextField)) }))), internalMode === 'show' && (_jsx(Box, __assign({ style: { marginTop: '-8px', marginBottom: '24px' } }, { children: _jsx(Typography, __assign({ variant: "body2", sx: { whiteSpace: 'pre-wrap', color: 'RGBA(0, 0, 0, 0.56)' } }, { children: content })) })))] }));
127
+ return (_jsxs(Stack, { children: [_jsxs(Stack, __assign({ style: { marginBottom: '18px' }, direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canReplace && (_jsx(Button, __assign({ loading: loading, onClick: handleReplace, variant: "outlined", color: "inherit", size: "small", icon: _jsx(RefreshIcon, {}) }, { children: loading ? '生成中' : '换一换' })))] })), internalMode === 'edit' && (_jsx(Box, __assign({ width: 1 }, { children: _jsx(TextField, __assign({}, nameTextField)) }))), internalMode === 'show' && (_jsx(Box, __assign({ style: { marginTop: '-8px', marginBottom: '32px' } }, { children: _jsx(Typography, __assign({ variant: "body2", sx: { whiteSpace: 'pre-wrap', color: 'RGBA(0, 0, 0, 0.56)' } }, { children: content })) })))] }));
128
128
  };
129
129
  export default AbilityFormItem;
@@ -47,15 +47,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
47
47
  };
48
48
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
49
49
  import AbilityFormItem from '../AbilityFormItem';
50
- import { PostQuestionCollectionUpsert } from "../../../../services/ai-ability";
50
+ import { CheckDuplicateCollection, PostQuestionCollectionUpsert } from "../../../../services/ai-ability";
51
51
  import { useRequest } from 'ahooks';
52
52
  import { Box, Button, Drawer, Message, TextField, Typography, useTextField } from 'fbm-ui';
53
53
  import { useCallback, useEffect, useState } from 'react';
54
54
  var AddAbility = function (props) {
55
- var open = props.open, _a = props.name, name = _a === void 0 ? '' : _a, _b = props.type, type = _b === void 0 ? 3 : _b, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
55
+ var open = props.open, _a = props.name, name = _a === void 0 ? '' : _a, _b = props.type, type = _b === void 0 ? 3 : _b, ablilityNameLength = props.ablilityNameLength, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
56
56
  var _c = useState(''), value = _c[0], setValue = _c[1];
57
57
  var _d = useState(1), step = _d[0], setStep = _d[1];
58
- var _e = useState(false), stepLoading = _e[0], setStepLoading = _e[1];
58
+ // const [stepLoading, setStepLoading] = useState<boolean>(false);
59
59
  var InitialValues = {
60
60
  workPlaceItems: [
61
61
  {
@@ -90,15 +90,27 @@ var AddAbility = function (props) {
90
90
  },
91
91
  ],
92
92
  };
93
- var _f = useState(InitialValues.workPlaceItems), workPlaceItems = _f[0], setWorkPlaceItems = _f[1];
94
- var _g = useRequest(PostQuestionCollectionUpsert, {
93
+ var _e = useState(InitialValues.workPlaceItems), workPlaceItems = _e[0], setWorkPlaceItems = _e[1];
94
+ var _f = useRequest(PostQuestionCollectionUpsert, {
95
95
  manual: true,
96
96
  onSuccess: function () {
97
97
  Message.success('新增能力成功');
98
98
  onClose();
99
99
  onSuccess();
100
100
  },
101
- }), run = _g.run, loading = _g.loading;
101
+ }), run = _f.run, loading = _f.loading;
102
+ var _g = useRequest(CheckDuplicateCollection, {
103
+ manual: true,
104
+ onSuccess: function (_a) {
105
+ var data = _a.data;
106
+ if (data.isDuplicate) {
107
+ nameTextField.setError('能力名称不能重复');
108
+ }
109
+ else {
110
+ setStep(2);
111
+ }
112
+ },
113
+ }), checkDuplicateCollection = _g.run, stepLoading = _g.loading;
102
114
  var nameTextField = useTextField({
103
115
  value: value,
104
116
  label: '能力名称',
@@ -110,10 +122,10 @@ var AddAbility = function (props) {
110
122
  },
111
123
  ],
112
124
  onChange: function (e) { return setValue(e.target.value); },
113
- max: 7,
125
+ max: ablilityNameLength,
114
126
  sx: {
115
127
  height: '48px',
116
- width: '320px',
128
+ width: '100%',
117
129
  marginTop: '16px',
118
130
  },
119
131
  });
@@ -125,16 +137,12 @@ var AddAbility = function (props) {
125
137
  case 1:
126
138
  error = _a.sent();
127
139
  if (!error) {
128
- setStepLoading(true);
129
- setTimeout(function () {
130
- setStep(2);
131
- setStepLoading(false);
132
- }, 300);
140
+ checkDuplicateCollection({ collectionName: value });
133
141
  }
134
142
  return [2 /*return*/];
135
143
  }
136
144
  });
137
- }); }, [nameTextField]);
145
+ }); }, [nameTextField, value, checkDuplicateCollection]);
138
146
  var handleValue = useCallback(function (v) {
139
147
  var index = workPlaceItems.findIndex(function (ele) { return ele.type === v.type; });
140
148
  workPlaceItems.splice(index, 1, v);
@@ -53,7 +53,7 @@ import { useRequest } from 'ahooks';
53
53
  import { Box, Button, Divider, Drawer, Message, TextField, Typography, useTextField } from 'fbm-ui';
54
54
  import { useCallback, useEffect, useRef, useState } from 'react';
55
55
  var UpdateAbility = function (props) {
56
- var open = props.open, _a = props.type, type = _a === void 0 ? 1 : _a, isWorkplace = props.isWorkplace, _b = props.name, name = _b === void 0 ? '' : _b, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
56
+ var open = props.open, _a = props.type, type = _a === void 0 ? 1 : _a, isWorkplace = props.isWorkplace, _b = props.name, name = _b === void 0 ? '' : _b, ablilityNameLength = props.ablilityNameLength, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
57
57
  var _c = useState(''), value = _c[0], setValue = _c[1];
58
58
  var _d = useState(1), step = _d[0], setStep = _d[1];
59
59
  var _e = useState('show'), mode = _e[0], setMode = _e[1];
@@ -68,6 +68,12 @@ var UpdateAbility = function (props) {
68
68
  onClose();
69
69
  onSuccess();
70
70
  },
71
+ onError: function (err) {
72
+ console.log(err);
73
+ if ((err === null || err === void 0 ? void 0 : err.code) === -1211) {
74
+ nameTextField.setError('能力名称不能重复');
75
+ }
76
+ },
71
77
  }), run = _h.run, loading = _h.loading;
72
78
  var getAbilityDetail = useRequest(GetAbilityDetail, {
73
79
  manual: true,
@@ -95,10 +101,10 @@ var UpdateAbility = function (props) {
95
101
  },
96
102
  ],
97
103
  onChange: function (e) { return setValue(e.target.value); },
98
- max: 7,
104
+ max: ablilityNameLength,
99
105
  sx: {
100
106
  height: '48px',
101
- width: '320px',
107
+ width: '100%',
102
108
  marginTop: '16px',
103
109
  },
104
110
  });
@@ -1,3 +1,4 @@
1
- /// <reference types="react" />
2
- declare const AiAbility: () => JSX.Element;
1
+ import { AiAbilityProps } from './interface';
2
+ import React from 'react';
3
+ declare const AiAbility: React.FC<AiAbilityProps>;
3
4
  export default AiAbility;
@@ -1,7 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  import AiAbilityRoot from './Root';
3
14
  import RootProvider from "../../components/RootProvider";
4
- var AiAbility = function () {
5
- return (_jsx(RootProvider, { children: _jsx(AiAbilityRoot, {}) }));
15
+ var AiAbility = function (props) {
16
+ return (_jsx(RootProvider, { children: _jsx(AiAbilityRoot, __assign({}, props)) }));
6
17
  };
7
18
  export default AiAbility;
@@ -1,3 +1,6 @@
1
+ export interface AiAbilityProps {
2
+ ablilityNameLength?: number;
3
+ }
1
4
  export interface QuestionCollectionList {
2
5
  name: string;
3
6
  token: string;
@@ -23,6 +26,7 @@ export interface AbilityProps {
23
26
  isWorkplace?: boolean;
24
27
  name?: string;
25
28
  token?: string;
29
+ ablilityNameLength?: number;
26
30
  onClose: () => void;
27
31
  onSuccess: () => void;
28
32
  }
@@ -41,3 +45,9 @@ export interface AiDefineRes {
41
45
  export interface AbilityDetailRes {
42
46
  data: AiDefineData;
43
47
  }
48
+ export interface CheckDuplicateCollectionData {
49
+ isDuplicate: boolean;
50
+ }
51
+ export interface CheckDuplicateCollectionRes {
52
+ data: CheckDuplicateCollectionData;
53
+ }
@@ -39,6 +39,6 @@ var AnalysisItem = function (props) {
39
39
  var value = _a.target.value;
40
40
  updateAiAbilitiesWeight(value, index);
41
41
  }, [updateAiAbilitiesWeight, index]);
42
- return (_jsxs(Box, { children: [_jsxs(ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: _jsx(IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: _jsx(CloseIcon, {}) })) }, { children: [_jsx(ListItemText, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle2" }, { children: name })), abilityType === 2 && !isWorkplace ? (_jsx(Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : (_jsxs(_Fragment, { children: [abilityType === 2 && isWorkplace && workplaceType === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), _jsx(Tooltip, __assign({ title: "".concat(desc), placement: "right" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && (_jsx(Select, { sx: { width: 150, ml: 1 }, options: willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && (_jsx(Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && _jsx(MainPoints, { extra: extra, index: index })] }));
42
+ return (_jsxs(Box, { children: [_jsxs(ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: _jsx(IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: _jsx(CloseIcon, {}) })) }, { children: [_jsx(ListItemText, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? (_jsx(Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : (_jsxs(_Fragment, { children: [abilityType === 2 && isWorkplace && workplaceType === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), _jsx(Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && (_jsx(Select, { sx: { width: 150, ml: 1 }, options: willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && (_jsx(Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && _jsx(MainPoints, { extra: extra, index: index })] }));
43
43
  };
44
44
  export default AnalysisItem;
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
1
  import { QuestionModelListItemProps } from './interface';
2
+ import React from 'react';
3
3
  declare const _default: React.NamedExoticComponent<QuestionModelListItemProps>;
4
4
  export default _default;
@@ -21,13 +21,13 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
- import { memo, useCallback } from 'react';
25
- import { Box, Chip, confirm, DeleteIcon, DragIndicatorIcon, EditIcon, IconButton, Input, Switch, Typography } from 'fbm-ui';
26
- import { Paper } from 'fbm-ui/lib/mui';
27
24
  import { DISABLED_REPEAT_TYPE, IS_AI_ANALYSIS, TEST_TYPE_READONLY } from "../../../../constants/ai-question";
28
25
  import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
29
26
  import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
30
27
  import { getSecondToTime } from "../../../../utils/utils";
28
+ import { Box, Chip, confirm, DeleteIcon, DragIndicatorIcon, EditIcon, IconButton, Input, Switch, Tooltip, Typography } from 'fbm-ui';
29
+ import { Paper } from 'fbm-ui/lib/mui';
30
+ import { memo, useCallback } from 'react';
31
31
  var QuestionModelListItem = function (props) {
32
32
  var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
33
33
  var token = step.token, name = step.name, desc = step.desc, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category;
@@ -67,6 +67,8 @@ var QuestionModelListItem = function (props) {
67
67
  console.log(answerStatus);
68
68
  editModel(__assign(__assign({}, step), { answerStatus: answerStatus === 2 ? 1 : 2 }), index);
69
69
  }, [editModel, answerStatus, step, index]);
70
- return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsxs(Box, __assign({ display: "flex", borderBottom: isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: [_jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragIndicatorIcon, { className: "dragHandle" }) })), _jsxs(Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [_jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) { return label && _jsx(Chip, { color: "default", label: label, size: "medium", sx: { ml: 1 } }, label); }), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), _jsx(Typography, __assign({ sx: { ml: 2 }, variant: "body2", color: "secondary" }, { children: getSecondToTime(Number(duration)) }))] })), _jsxs(Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!TEST_TYPE_READONLY.includes(type) && (_jsx(IconButton, __assign({ size: "small", onClick: handleEdit }, { children: _jsx(EditIcon, {}) }))), _jsx(IconButton, __assign({ size: "small", onClick: handleRemove }, { children: _jsx(DeleteIcon, {}) }))] }))] })), _jsxs(Box, __assign({ mt: 1, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: desc })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }))] }))] }))] })), isAiAnalysis && (_jsxs(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 82 }, size: "small", value: weight, endAdornment: "%", disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur })] })))] })));
70
+ return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsxs(Box, __assign({ display: "flex", borderBottom: isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: [_jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragIndicatorIcon, { className: "dragHandle" }) })), _jsxs(Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [_jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
71
+ return label && (_jsx(Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: _jsx(Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
72
+ }), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), _jsx(Typography, __assign({ sx: { ml: 2 }, variant: "body2", color: "secondary" }, { children: getSecondToTime(Number(duration)) }))] })), _jsxs(Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!TEST_TYPE_READONLY.includes(type) && (_jsx(IconButton, __assign({ size: "small", onClick: handleEdit }, { children: _jsx(EditIcon, {}) }))), _jsx(IconButton, __assign({ size: "small", onClick: handleRemove }, { children: _jsx(DeleteIcon, {}) }))] }))] })), _jsxs(Box, __assign({ mt: 1, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: desc })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }))] }))] }))] })), isAiAnalysis && (_jsxs(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 82 }, size: "small", value: weight, endAdornment: "%", disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur })] })))] })));
71
73
  };
72
74
  export default memo(QuestionModelListItem);
@@ -34,7 +34,7 @@ var Abilities = function (_a) {
34
34
  return (_jsxs(Box, __assign({ mt: 1 }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary", mb: 1 }, { children: "\u5206\u503C\u8BA1\u7B97\u89C4\u5219\uFF1A\u7EFC\u5408\u8BC4\u5206=AI\u8BC4\u5206*\u5355\u9898\u6743\u91CD" })), _jsx(Box, __assign({ mt: 3 }, { children: steps &&
35
35
  steps[stepIndex].scoreInfo.abilities.map(function (_a, index) {
36
36
  var name = _a.name, originScore = _a.originScore, finalScore = _a.finalScore;
37
- return (_jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: name })), _jsx(ScoreSlider, { width: 400, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "auto", onChangeCommitted: function (score) { return handleChangeCommitted(score, index, 'ability'); } })] }, name));
37
+ return (_jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body2" }, { children: name })), _jsx(ScoreSlider, { width: 420, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "auto", onChangeCommitted: function (score) { return handleChangeCommitted(score, index, 'ability'); } })] }, name));
38
38
  }) }))] })));
39
39
  };
40
40
  export default Abilities;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
1
  import { ScoreSliderProps } from './interface';
2
+ import { FC } from 'react';
3
3
  declare const ScoreSlider: FC<ScoreSliderProps>;
4
4
  export default ScoreSlider;
@@ -10,21 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useCallback, useEffect, useState } from 'react';
14
- import { Tooltip, Typography } from 'fbm-ui';
15
- import { useAiReportStore } from "../../../../store/ai-report/global-store";
16
13
  import { AiScoreRoot, ScoreSliderRoot, StyledSlider } from './styled';
14
+ // import { scoreRankIntervalColors } from '@constants/ai-report';
15
+ import { useAiReportStore } from "../../../../store/ai-report/global-store";
16
+ import { Tooltip, Typography } from 'fbm-ui';
17
+ import { useCallback, useEffect, useState } from 'react';
17
18
  var ScoreSlider = function (props) {
18
19
  var _a = props.width, width = _a === void 0 ? 320 : _a, originScore = props.originScore, finalScore = props.finalScore, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'on' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.isShowScoreRank, isShowScoreRank = _d === void 0 ? false : _d, onChangeCommitted = props.onChangeCommitted;
19
20
  var aiScore = originScore.toFixed(0);
20
21
  var _e = useState(0), score = _e[0], setScore = _e[1];
21
- var _f = useAiReportStore(function (store) { return [store.disabledScore, store.scoreRankIntervals]; }), disabledScore = _f.disabledScore, scoreRankIntervals = _f.scoreRankIntervals;
22
+ var disabledScore = useAiReportStore(function (store) { return [store.disabledScore, store.scoreRankIntervals]; }).disabledScore;
22
23
  var handleScoreChange = useCallback(function (e, v) {
23
24
  !disabledScore && setScore(v);
24
25
  }, [disabledScore]);
25
26
  useEffect(function () {
26
27
  setScore(Number(finalScore.toFixed(0)));
27
28
  }, [finalScore]);
28
- return (_jsxs(ScoreSliderRoot, __assign({ width: width }, { children: [isShowScoreRank && (_jsx(_Fragment, { children: _jsx(Tooltip, __assign({ title: "AI\u5F97\u5206\uFF1A".concat(aiScore), placement: "top" }, { children: _jsx(AiScoreRoot, { sx: { left: "calc(".concat(aiScore, "% - 12px)") } }) })) })), _jsx(StyledSlider, { valueLabelDisplay: valueLabelDisplay, value: score, onChange: handleScoreChange, onChangeCommitted: function () { return onChangeCommitted(score); } }), isShowLabel && (_jsxs(Typography, __assign({ width: 80, flexShrink: 0, textAlign: "right", variant: "body2" }, { children: [score, "\u5206"] })))] })));
29
+ return (_jsxs(ScoreSliderRoot, __assign({ width: width }, { children: [isShowScoreRank && (_jsx(_Fragment, { children: _jsx(Tooltip, __assign({ title: "AI\u5F97\u5206\uFF1A".concat(aiScore), placement: "top" }, { children: _jsx(AiScoreRoot, { sx: { left: "calc(".concat(aiScore, "% - 12px)") } }) })) })), _jsx(StyledSlider, { valueLabelDisplay: valueLabelDisplay, value: score, onChange: handleScoreChange, onChangeCommitted: function () { return onChangeCommitted(score); } }), isShowLabel && (_jsxs(Typography, __assign({ width: 70, flexShrink: 0, textAlign: "right", variant: "body2" }, { children: [score, "\u5206"] })))] })));
29
30
  };
30
31
  export default ScoreSlider;
@@ -23,6 +23,7 @@ var TagTitle = styled(Box)(function (bgcolor) { return ({
23
23
  padding: '0 16px',
24
24
  minWidth: 100,
25
25
  height: 32,
26
+ flexGrow: 1,
26
27
  display: 'inline-block',
27
28
  textAlign: 'center',
28
29
  backgroundColor: bgcolor[200],
@@ -62,7 +63,7 @@ var Index = function () {
62
63
  if (!showAiDimension)
63
64
  return null;
64
65
  return (_jsxs(Box, __assign({ id: "report-workplace", component: Paper, variant: "outlined", px: 2, mt: 2 }, { children: [_jsx(Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: _jsx(AiHeaderTitle, { name: "\u804C\u573A\u80FD\u529B\u8868\u73B0" }) })), _jsx(Collapse, __assign({ in: true }, { children: (_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaces) === null || _a === void 0 ? void 0 : _a.map(function (v, idx) {
65
- return (_jsxs(Box, __assign({ component: Paper, variant: "outlined", elevation: 0, mb: 2, pb: 2, pr: 2 }, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", mb: 2, mt: 1 }, { children: [_jsx(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: _jsx(Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff' } }, { children: v.dimensionName })) })), v.dimensionType === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } })] })), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, _jsx("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), _jsx(Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), _jsxs(Stack, __assign({ pl: 2 }, { children: [_jsx(Box, __assign({ mt: 2 }, { children: _jsx(ScoreSlider, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), _jsx(Stack, __assign({ spacing: 2 }, { children: _jsx(WorkPlace, { token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
66
+ return (_jsxs(Box, __assign({ component: Paper, variant: "outlined", elevation: 0, mb: 2, pb: 2, pr: 2 }, { children: [_jsxs(Box, __assign({ display: "flex", mb: 2, mt: 1, justifyContent: "space-between", alignItems: "center" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", maxWidth: "calc(100% - 90px)" }, { children: [_jsx(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: _jsx(Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' } }, { children: v.dimensionName })) })), v.dimensionType === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } })] })), _jsx(Tooltip, __assign({ title: _jsxs("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, _jsx("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), _jsx(InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), _jsx(Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), _jsxs(Stack, __assign({ pl: 2 }, { children: [_jsx(Box, __assign({ mt: 2 }, { children: _jsx(ScoreSlider, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), _jsx(Stack, __assign({ spacing: 2 }, { children: _jsx(WorkPlace, { token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
66
67
  }) }))] })));
67
68
  };
68
69
  export default Index;
@@ -20,4 +20,5 @@ interface DiyUpsertData {
20
20
  export declare const PostQuestionCollectionUpsert: <R>(data: DiyUpsertData) => import("axios").AxiosPromise<R>;
21
21
  export declare const GetAiDefine: <R>(data: any) => import("axios").AxiosPromise<R>;
22
22
  export declare const GetAbilityDetail: <R>(data: any) => import("axios").AxiosPromise<R>;
23
+ export declare const CheckDuplicateCollection: <R>(data: any) => import("axios").AxiosPromise<R>;
23
24
  export {};
@@ -21,3 +21,5 @@ export var PostQuestionCollectionUpsert = function (data) {
21
21
  export var GetAiDefine = function (data) { return POST({ url: '/standard/b/questionCollection/intelligenceQuery', data: data }); };
22
22
  // 获取考察能力详情
23
23
  export var GetAbilityDetail = function (data) { return POST({ url: '/standard/b/questionCollection', data: data }); };
24
+ // 能力名称查重
25
+ export var CheckDuplicateCollection = function (data) { return POST({ url: '/standard/b/questionCollection/checkDuplicateCollection', data: data }); };
@@ -30,8 +30,12 @@ var const_1 = require("./const");
30
30
  var Chart_1 = __importDefault(require("./Chart"));
31
31
  var formateTitle = function (originalTitle) {
32
32
  var regex = /(\d+?)[.](.+)/;
33
- if (!regex.test(originalTitle))
33
+ if (!regex.test(originalTitle)) {
34
+ if (originalTitle.length > 7) {
35
+ originalTitle = "".concat(originalTitle.slice(0, 6), "...");
36
+ }
34
37
  return originalTitle;
38
+ }
35
39
  var _a = originalTitle.match(regex), no = _a[1];
36
40
  return "\u7B2C".concat(no, "\u9898");
37
41
  };
@@ -1,3 +1,4 @@
1
- import { FC } from 'react';
2
- declare const AiAbilityRoot: FC;
1
+ import { AiAbilityProps } from './interface';
2
+ import React from 'react';
3
+ declare const AiAbilityRoot: React.FC<AiAbilityProps>;
3
4
  export default AiAbilityRoot;
@@ -59,16 +59,17 @@ var ahooks_1 = require("ahooks");
59
59
  var dayjs_1 = __importDefault(require("dayjs"));
60
60
  var fbm_ui_1 = require("fbm-ui");
61
61
  var react_1 = require("react");
62
- var AiAbilityRoot = function () {
63
- var _a = (0, ahooks_1.useSetState)({
62
+ var AiAbilityRoot = function (_a) {
63
+ var _b = _a.ablilityNameLength, ablilityNameLength = _b === void 0 ? 30 : _b;
64
+ var _c = (0, ahooks_1.useSetState)({
64
65
  name: '',
65
66
  token: '',
66
67
  type: 3,
67
68
  isWorkplace: false,
68
- }), state = _a[0], setState = _a[1];
69
- var _b = (0, react_1.useState)(false), AddAbilityOpen = _b[0], setAddAbilityOpen = _b[1];
70
- var _c = (0, react_1.useState)(false), UpdateAbilityOpen = _c[0], setUpdateAbilityOpen = _c[1];
71
- var _d = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionList), data = _d.data, getList = _d.run, listLoading = _d.loading;
69
+ }), state = _c[0], setState = _c[1];
70
+ var _d = (0, react_1.useState)(false), AddAbilityOpen = _d[0], setAddAbilityOpen = _d[1];
71
+ var _e = (0, react_1.useState)(false), UpdateAbilityOpen = _e[0], setUpdateAbilityOpen = _e[1];
72
+ var _f = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionList), data = _f.data, getList = _f.run, listLoading = _f.loading;
72
73
  var deleteList = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionDelete, {
73
74
  manual: true,
74
75
  onSuccess: function () {
@@ -135,7 +136,7 @@ var AiAbilityRoot = function () {
135
136
  label: '最后更新人',
136
137
  render: function (_a) {
137
138
  var cell = _a.cell, row = _a.row;
138
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: row.type === 1 ? '-' : cell === null || cell === void 0 ? void 0 : cell.account });
139
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: row.type === 1 ? '-' : (cell === null || cell === void 0 ? void 0 : cell.account) || '-' });
139
140
  },
140
141
  },
141
142
  {
@@ -143,10 +144,10 @@ var AiAbilityRoot = function () {
143
144
  label: '操作',
144
145
  render: function (_a) {
145
146
  var row = _a.row;
146
- return row.type === 1 ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: (0, jsx_runtime_1.jsx)(fbm_ui_1.DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: (0, jsx_runtime_1.jsx)(fbm_ui_1.DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u5220\u9664" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', cursor: 'pointer' }, text: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}), onClick: function () { return handleDelete(row); } }) }))] }));
147
+ return row.type === 1 ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: (0, jsx_runtime_1.jsx)(fbm_ui_1.DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) }))) : ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ minWidth: "80px" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u80FD\u529B\u8BE6\u60C5" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', mr: 3, cursor: 'pointer' }, text: (0, jsx_runtime_1.jsx)(fbm_ui_1.DocumentIcon, {}), onClick: function () { return handleEdit(row); } }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u5220\u9664" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Link, { sx: { color: 'rgba(0, 0, 0, 0.56)', cursor: 'pointer' }, text: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}), onClick: function () { return handleDelete(row); } }) }))] })));
147
148
  },
148
149
  },
149
150
  ];
150
- return ((0, jsx_runtime_1.jsxs)(styled_1.AbilityRoot, { children: [AddAbilityOpen && (0, jsx_runtime_1.jsx)(AddAbility_1.default, __assign({}, state, { open: AddAbilityOpen, onClose: handleClose, onSuccess: getList })), UpdateAbilityOpen && (0, jsx_runtime_1.jsx)(UpdateAbility_1.default, __assign({}, state, { open: UpdateAbilityOpen, onClose: handleClose, onSuccess: getList })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Header, { title: "\u8003\u5BDF\u80FD\u529B\u7BA1\u7406", renderAction: function () { return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: handleAdd }, { children: "\u65B0\u589E\u80FD\u529B" }))); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2, border: "1px solid rgba(0, 0, 0, 0.08)", borderRadius: 0.5, overflow: "hidden" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Table, { emptyText: "\u6682\u65E0\u6570\u636E", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns }) }))] }));
151
+ return ((0, jsx_runtime_1.jsxs)(styled_1.AbilityRoot, { children: [AddAbilityOpen && ((0, jsx_runtime_1.jsx)(AddAbility_1.default, __assign({}, state, { open: AddAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), UpdateAbilityOpen && ((0, jsx_runtime_1.jsx)(UpdateAbility_1.default, __assign({}, state, { open: UpdateAbilityOpen, ablilityNameLength: ablilityNameLength, onClose: handleClose, onSuccess: getList }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.Header, { title: "\u8003\u5BDF\u80FD\u529B\u7BA1\u7406", renderAction: function () { return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: handleAdd }, { children: "\u65B0\u589E\u80FD\u529B" }))); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2, border: "1px solid rgba(0, 0, 0, 0.08)", borderRadius: 0.5, overflow: "hidden" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Table, { emptyText: "\u6682\u65E0\u6570\u636E", nameText: "\u8003\u5BDF\u80FD\u529B", loading: listLoading, data: data === null || data === void 0 ? void 0 : data.data.list, columns: columns }) }))] }));
151
152
  };
152
153
  exports.default = AiAbilityRoot;
@@ -100,7 +100,7 @@ var AbilityFormItem = function (_a) {
100
100
  rows: 3,
101
101
  multiline: true,
102
102
  sx: {
103
- marginBottom: '32px',
103
+ marginBottom: '43px',
104
104
  },
105
105
  });
106
106
  (0, react_1.useEffect)(function () {
@@ -126,6 +126,6 @@ var AbilityFormItem = function (_a) {
126
126
  });
127
127
  // eslint-disable-next-line react-hooks/exhaustive-deps
128
128
  }, [type, name, token]);
129
- return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ style: { marginBottom: '18px' }, direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canReplace && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ loading: loading, onClick: handleReplace, variant: "outlined", color: "inherit", size: "small", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.RefreshIcon, {}) }, { children: loading ? '生成中' : '换一换' })))] })), internalMode === 'edit' && ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ width: 1, pr: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.TextField, __assign({}, nameTextField)) }))), internalMode === 'show' && ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ style: { marginTop: '-8px', marginBottom: '24px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { whiteSpace: 'pre-wrap', color: 'RGBA(0, 0, 0, 0.56)' } }, { children: content })) })))] }));
129
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ style: { marginBottom: '18px' }, direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canReplace && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ loading: loading, onClick: handleReplace, variant: "outlined", color: "inherit", size: "small", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.RefreshIcon, {}) }, { children: loading ? '生成中' : '换一换' })))] })), internalMode === 'edit' && ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ width: 1 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.TextField, __assign({}, nameTextField)) }))), internalMode === 'show' && ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ style: { marginTop: '-8px', marginBottom: '32px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { whiteSpace: 'pre-wrap', color: 'RGBA(0, 0, 0, 0.56)' } }, { children: content })) })))] }));
130
130
  };
131
131
  exports.default = AbilityFormItem;
@@ -57,10 +57,10 @@ var ahooks_1 = require("ahooks");
57
57
  var fbm_ui_1 = require("fbm-ui");
58
58
  var react_1 = require("react");
59
59
  var AddAbility = function (props) {
60
- var open = props.open, _a = props.name, name = _a === void 0 ? '' : _a, _b = props.type, type = _b === void 0 ? 3 : _b, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
60
+ var open = props.open, _a = props.name, name = _a === void 0 ? '' : _a, _b = props.type, type = _b === void 0 ? 3 : _b, ablilityNameLength = props.ablilityNameLength, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
61
61
  var _c = (0, react_1.useState)(''), value = _c[0], setValue = _c[1];
62
62
  var _d = (0, react_1.useState)(1), step = _d[0], setStep = _d[1];
63
- var _e = (0, react_1.useState)(false), stepLoading = _e[0], setStepLoading = _e[1];
63
+ // const [stepLoading, setStepLoading] = useState<boolean>(false);
64
64
  var InitialValues = {
65
65
  workPlaceItems: [
66
66
  {
@@ -95,15 +95,27 @@ var AddAbility = function (props) {
95
95
  },
96
96
  ],
97
97
  };
98
- var _f = (0, react_1.useState)(InitialValues.workPlaceItems), workPlaceItems = _f[0], setWorkPlaceItems = _f[1];
99
- var _g = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionUpsert, {
98
+ var _e = (0, react_1.useState)(InitialValues.workPlaceItems), workPlaceItems = _e[0], setWorkPlaceItems = _e[1];
99
+ var _f = (0, ahooks_1.useRequest)(ai_ability_1.PostQuestionCollectionUpsert, {
100
100
  manual: true,
101
101
  onSuccess: function () {
102
102
  fbm_ui_1.Message.success('新增能力成功');
103
103
  onClose();
104
104
  onSuccess();
105
105
  },
106
- }), run = _g.run, loading = _g.loading;
106
+ }), run = _f.run, loading = _f.loading;
107
+ var _g = (0, ahooks_1.useRequest)(ai_ability_1.CheckDuplicateCollection, {
108
+ manual: true,
109
+ onSuccess: function (_a) {
110
+ var data = _a.data;
111
+ if (data.isDuplicate) {
112
+ nameTextField.setError('能力名称不能重复');
113
+ }
114
+ else {
115
+ setStep(2);
116
+ }
117
+ },
118
+ }), checkDuplicateCollection = _g.run, stepLoading = _g.loading;
107
119
  var nameTextField = (0, fbm_ui_1.useTextField)({
108
120
  value: value,
109
121
  label: '能力名称',
@@ -115,10 +127,10 @@ var AddAbility = function (props) {
115
127
  },
116
128
  ],
117
129
  onChange: function (e) { return setValue(e.target.value); },
118
- max: 7,
130
+ max: ablilityNameLength,
119
131
  sx: {
120
132
  height: '48px',
121
- width: '320px',
133
+ width: '100%',
122
134
  marginTop: '16px',
123
135
  },
124
136
  });
@@ -130,16 +142,12 @@ var AddAbility = function (props) {
130
142
  case 1:
131
143
  error = _a.sent();
132
144
  if (!error) {
133
- setStepLoading(true);
134
- setTimeout(function () {
135
- setStep(2);
136
- setStepLoading(false);
137
- }, 300);
145
+ checkDuplicateCollection({ collectionName: value });
138
146
  }
139
147
  return [2 /*return*/];
140
148
  }
141
149
  });
142
- }); }, [nameTextField]);
150
+ }); }, [nameTextField, value, checkDuplicateCollection]);
143
151
  var handleValue = (0, react_1.useCallback)(function (v) {
144
152
  var index = workPlaceItems.findIndex(function (ele) { return ele.type === v.type; });
145
153
  workPlaceItems.splice(index, 1, v);
@@ -58,7 +58,7 @@ var ahooks_1 = require("ahooks");
58
58
  var fbm_ui_1 = require("fbm-ui");
59
59
  var react_1 = require("react");
60
60
  var UpdateAbility = function (props) {
61
- var open = props.open, _a = props.type, type = _a === void 0 ? 1 : _a, isWorkplace = props.isWorkplace, _b = props.name, name = _b === void 0 ? '' : _b, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
61
+ var open = props.open, _a = props.type, type = _a === void 0 ? 1 : _a, isWorkplace = props.isWorkplace, _b = props.name, name = _b === void 0 ? '' : _b, ablilityNameLength = props.ablilityNameLength, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
62
62
  var _c = (0, react_1.useState)(''), value = _c[0], setValue = _c[1];
63
63
  var _d = (0, react_1.useState)(1), step = _d[0], setStep = _d[1];
64
64
  var _e = (0, react_1.useState)('show'), mode = _e[0], setMode = _e[1];
@@ -73,6 +73,12 @@ var UpdateAbility = function (props) {
73
73
  onClose();
74
74
  onSuccess();
75
75
  },
76
+ onError: function (err) {
77
+ console.log(err);
78
+ if ((err === null || err === void 0 ? void 0 : err.code) === -1211) {
79
+ nameTextField.setError('能力名称不能重复');
80
+ }
81
+ },
76
82
  }), run = _h.run, loading = _h.loading;
77
83
  var getAbilityDetail = (0, ahooks_1.useRequest)(ai_ability_1.GetAbilityDetail, {
78
84
  manual: true,
@@ -100,10 +106,10 @@ var UpdateAbility = function (props) {
100
106
  },
101
107
  ],
102
108
  onChange: function (e) { return setValue(e.target.value); },
103
- max: 7,
109
+ max: ablilityNameLength,
104
110
  sx: {
105
111
  height: '48px',
106
- width: '320px',
112
+ width: '100%',
107
113
  marginTop: '16px',
108
114
  },
109
115
  });
@@ -1,3 +1,4 @@
1
- /// <reference types="react" />
2
- declare const AiAbility: () => JSX.Element;
1
+ import { AiAbilityProps } from './interface';
2
+ import React from 'react';
3
+ declare const AiAbility: React.FC<AiAbilityProps>;
3
4
  export default AiAbility;
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
@@ -6,7 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
17
  var jsx_runtime_1 = require("react/jsx-runtime");
7
18
  var Root_1 = __importDefault(require("./Root"));
8
19
  var RootProvider_1 = __importDefault(require("../../components/RootProvider"));
9
- var AiAbility = function () {
10
- return ((0, jsx_runtime_1.jsx)(RootProvider_1.default, { children: (0, jsx_runtime_1.jsx)(Root_1.default, {}) }));
20
+ var AiAbility = function (props) {
21
+ return ((0, jsx_runtime_1.jsx)(RootProvider_1.default, { children: (0, jsx_runtime_1.jsx)(Root_1.default, __assign({}, props)) }));
11
22
  };
12
23
  exports.default = AiAbility;
@@ -1,3 +1,6 @@
1
+ export interface AiAbilityProps {
2
+ ablilityNameLength?: number;
3
+ }
1
4
  export interface QuestionCollectionList {
2
5
  name: string;
3
6
  token: string;
@@ -23,6 +26,7 @@ export interface AbilityProps {
23
26
  isWorkplace?: boolean;
24
27
  name?: string;
25
28
  token?: string;
29
+ ablilityNameLength?: number;
26
30
  onClose: () => void;
27
31
  onSuccess: () => void;
28
32
  }
@@ -41,3 +45,9 @@ export interface AiDefineRes {
41
45
  export interface AbilityDetailRes {
42
46
  data: AiDefineData;
43
47
  }
48
+ export interface CheckDuplicateCollectionData {
49
+ isDuplicate: boolean;
50
+ }
51
+ export interface CheckDuplicateCollectionRes {
52
+ data: CheckDuplicateCollectionData;
53
+ }
@@ -44,6 +44,6 @@ var AnalysisItem = function (props) {
44
44
  var value = _a.target.value;
45
45
  updateAiAbilitiesWeight(value, index);
46
46
  }, [updateAiAbilitiesWeight, index]);
47
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(mui_1.ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })) }, { children: [(0, jsx_runtime_1.jsx)(mui_1.ListItemText, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle2" }, { children: name })), abilityType === 2 && !isWorkplace ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [abilityType === 2 && isWorkplace && workplaceType === 3 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(desc), placement: "right" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { sx: { width: 150, ml: 1 }, options: const_1.willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && (0, jsx_runtime_1.jsx)(MainPoints_1.default, { extra: extra, index: index })] }));
47
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(mui_1.ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })) }, { children: [(0, jsx_runtime_1.jsx)(mui_1.ListItemText, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [abilityType === 2 && isWorkplace && workplaceType === 3 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { sx: { width: 150, ml: 1 }, options: const_1.willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && (0, jsx_runtime_1.jsx)(MainPoints_1.default, { extra: extra, index: index })] }));
48
48
  };
49
49
  exports.default = AnalysisItem;
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
1
  import { QuestionModelListItemProps } from './interface';
2
+ import React from 'react';
3
3
  declare const _default: React.NamedExoticComponent<QuestionModelListItemProps>;
4
4
  export default _default;
@@ -23,13 +23,13 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  var jsx_runtime_1 = require("react/jsx-runtime");
26
- var react_1 = require("react");
27
- var fbm_ui_1 = require("fbm-ui");
28
- var mui_1 = require("fbm-ui/lib/mui");
29
26
  var ai_question_1 = require("../../../../constants/ai-question");
30
27
  var question_model_store_1 = require("../../../../store/ai-question/question-model-store");
31
28
  var question_update_store_1 = require("../../../../store/ai-question/question-update-store");
32
29
  var utils_1 = require("../../../../utils/utils");
30
+ var fbm_ui_1 = require("fbm-ui");
31
+ var mui_1 = require("fbm-ui/lib/mui");
32
+ var react_1 = require("react");
33
33
  var QuestionModelListItem = function (props) {
34
34
  var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
35
35
  var token = step.token, name = step.name, desc = step.desc, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category;
@@ -69,6 +69,8 @@ var QuestionModelListItem = function (props) {
69
69
  console.log(answerStatus);
70
70
  editModel(__assign(__assign({}, step), { answerStatus: answerStatus === 2 ? 1 : 2 }), index);
71
71
  }, [editModel, answerStatus, step, index]);
72
- return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", borderBottom: isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DragIndicatorIcon, { className: "dragHandle" }) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) { return label && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: "default", label: label, size: "medium", sx: { ml: 1 } }, label); }), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { ml: 2 }, variant: "body2", color: "secondary" }, { children: (0, utils_1.getSecondToTime)(Number(duration)) }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!ai_question_1.TEST_TYPE_READONLY.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleEdit }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))] }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: desc })), !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }))] }))] }))] })), isAiAnalysis && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 82 }, size: "small", value: weight, endAdornment: "%", disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur })] })))] })));
72
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", borderBottom: isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DragIndicatorIcon, { className: "dragHandle" }) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", padding: "16px 0" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
73
+ return label && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
74
+ }), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { ml: 2 }, variant: "body2", color: "secondary" }, { children: (0, utils_1.getSecondToTime)(Number(duration)) }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!ai_question_1.TEST_TYPE_READONLY.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleEdit }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))] }))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: desc })), !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }))] }))] }))] })), isAiAnalysis && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 40px" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 82 }, size: "small", value: weight, endAdornment: "%", disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur })] })))] })));
73
75
  };
74
76
  exports.default = (0, react_1.memo)(QuestionModelListItem);
@@ -39,7 +39,7 @@ var Abilities = function (_a) {
39
39
  return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", mb: 1 }, { children: "\u5206\u503C\u8BA1\u7B97\u89C4\u5219\uFF1A\u7EFC\u5408\u8BC4\u5206=AI\u8BC4\u5206*\u5355\u9898\u6743\u91CD" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 3 }, { children: steps &&
40
40
  steps[stepIndex].scoreInfo.abilities.map(function (_a, index) {
41
41
  var name = _a.name, originScore = _a.originScore, finalScore = _a.finalScore;
42
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: name })), (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: 400, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "auto", onChangeCommitted: function (score) { return handleChangeCommitted(score, index, 'ability'); } })] }, name));
42
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: name })), (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: 420, isShowLabel: true, originScore: originScore, finalScore: finalScore, valueLabelDisplay: "auto", onChangeCommitted: function (score) { return handleChangeCommitted(score, index, 'ability'); } })] }, name));
43
43
  }) }))] })));
44
44
  };
45
45
  exports.default = Abilities;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
1
  import { ScoreSliderProps } from './interface';
2
+ import { FC } from 'react';
3
3
  declare const ScoreSlider: FC<ScoreSliderProps>;
4
4
  export default ScoreSlider;
@@ -12,21 +12,22 @@ var __assign = (this && this.__assign) || function () {
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  var jsx_runtime_1 = require("react/jsx-runtime");
15
- var react_1 = require("react");
16
- var fbm_ui_1 = require("fbm-ui");
17
- var global_store_1 = require("../../../../store/ai-report/global-store");
18
15
  var styled_1 = require("./styled");
16
+ // import { scoreRankIntervalColors } from '@constants/ai-report';
17
+ var global_store_1 = require("../../../../store/ai-report/global-store");
18
+ var fbm_ui_1 = require("fbm-ui");
19
+ var react_1 = require("react");
19
20
  var ScoreSlider = function (props) {
20
21
  var _a = props.width, width = _a === void 0 ? 320 : _a, originScore = props.originScore, finalScore = props.finalScore, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'on' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.isShowScoreRank, isShowScoreRank = _d === void 0 ? false : _d, onChangeCommitted = props.onChangeCommitted;
21
22
  var aiScore = originScore.toFixed(0);
22
23
  var _e = (0, react_1.useState)(0), score = _e[0], setScore = _e[1];
23
- var _f = (0, global_store_1.useAiReportStore)(function (store) { return [store.disabledScore, store.scoreRankIntervals]; }), disabledScore = _f.disabledScore, scoreRankIntervals = _f.scoreRankIntervals;
24
+ var disabledScore = (0, global_store_1.useAiReportStore)(function (store) { return [store.disabledScore, store.scoreRankIntervals]; }).disabledScore;
24
25
  var handleScoreChange = (0, react_1.useCallback)(function (e, v) {
25
26
  !disabledScore && setScore(v);
26
27
  }, [disabledScore]);
27
28
  (0, react_1.useEffect)(function () {
28
29
  setScore(Number(finalScore.toFixed(0)));
29
30
  }, [finalScore]);
30
- return ((0, jsx_runtime_1.jsxs)(styled_1.ScoreSliderRoot, __assign({ width: width }, { children: [isShowScoreRank && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "AI\u5F97\u5206\uFF1A".concat(aiScore), placement: "top" }, { children: (0, jsx_runtime_1.jsx)(styled_1.AiScoreRoot, { sx: { left: "calc(".concat(aiScore, "% - 12px)") } }) })) })), (0, jsx_runtime_1.jsx)(styled_1.StyledSlider, { valueLabelDisplay: valueLabelDisplay, value: score, onChange: handleScoreChange, onChangeCommitted: function () { return onChangeCommitted(score); } }), isShowLabel && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ width: 80, flexShrink: 0, textAlign: "right", variant: "body2" }, { children: [score, "\u5206"] })))] })));
31
+ return ((0, jsx_runtime_1.jsxs)(styled_1.ScoreSliderRoot, __assign({ width: width }, { children: [isShowScoreRank && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "AI\u5F97\u5206\uFF1A".concat(aiScore), placement: "top" }, { children: (0, jsx_runtime_1.jsx)(styled_1.AiScoreRoot, { sx: { left: "calc(".concat(aiScore, "% - 12px)") } }) })) })), (0, jsx_runtime_1.jsx)(styled_1.StyledSlider, { valueLabelDisplay: valueLabelDisplay, value: score, onChange: handleScoreChange, onChangeCommitted: function () { return onChangeCommitted(score); } }), isShowLabel && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ width: 70, flexShrink: 0, textAlign: "right", variant: "body2" }, { children: [score, "\u5206"] })))] })));
31
32
  };
32
33
  exports.default = ScoreSlider;
@@ -28,6 +28,7 @@ var TagTitle = (0, fbm_ui_1.styled)(mui_1.Box)(function (bgcolor) { return ({
28
28
  padding: '0 16px',
29
29
  minWidth: 100,
30
30
  height: 32,
31
+ flexGrow: 1,
31
32
  display: 'inline-block',
32
33
  textAlign: 'center',
33
34
  backgroundColor: bgcolor[200],
@@ -67,7 +68,7 @@ var Index = function () {
67
68
  if (!showAiDimension)
68
69
  return null;
69
70
  return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ id: "report-workplace", component: mui_1.Paper, variant: "outlined", px: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: (0, jsx_runtime_1.jsx)(AiHeaderTitle_1.default, { name: "\u804C\u573A\u80FD\u529B\u8868\u73B0" }) })), (0, jsx_runtime_1.jsx)(mui_1.Collapse, __assign({ in: true }, { children: (_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaces) === null || _a === void 0 ? void 0 : _a.map(function (v, idx) {
70
- return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ component: mui_1.Paper, variant: "outlined", elevation: 0, mb: 2, pb: 2, pr: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center", mb: 2, mt: 1 }, { children: [(0, jsx_runtime_1.jsx)(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff' } }, { children: v.dimensionName })) })), v.dimensionType === 3 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } })] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: (0, jsx_runtime_1.jsxs)("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, (0, jsx_runtime_1.jsx)("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ pl: 2 }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 2 }, { children: (0, jsx_runtime_1.jsx)(WorkPlace_1.default, { token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
71
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ component: mui_1.Paper, variant: "outlined", elevation: 0, mb: 2, pb: 2, pr: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", mb: 2, mt: 1, justifyContent: "space-between", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center", maxWidth: "calc(100% - 90px)" }, { children: [(0, jsx_runtime_1.jsx)(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' } }, { children: v.dimensionName })) })), v.dimensionType === 3 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } })] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: (0, jsx_runtime_1.jsxs)("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, (0, jsx_runtime_1.jsx)("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ pl: 2 }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 2 }, { children: (0, jsx_runtime_1.jsx)(WorkPlace_1.default, { token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
71
72
  }) }))] })));
72
73
  };
73
74
  exports.default = Index;
@@ -20,4 +20,5 @@ interface DiyUpsertData {
20
20
  export declare const PostQuestionCollectionUpsert: <R>(data: DiyUpsertData) => import("axios").AxiosPromise<R>;
21
21
  export declare const GetAiDefine: <R>(data: any) => import("axios").AxiosPromise<R>;
22
22
  export declare const GetAbilityDetail: <R>(data: any) => import("axios").AxiosPromise<R>;
23
+ export declare const CheckDuplicateCollection: <R>(data: any) => import("axios").AxiosPromise<R>;
23
24
  export {};
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.GetAbilityDetail = exports.GetAiDefine = exports.PostQuestionCollectionUpsert = exports.PostQuestionCollectionDelete = exports.PostQuestionCollectionList = void 0;
14
+ exports.CheckDuplicateCollection = exports.GetAbilityDetail = exports.GetAiDefine = exports.PostQuestionCollectionUpsert = exports.PostQuestionCollectionDelete = exports.PostQuestionCollectionList = void 0;
15
15
  var request_1 = require("../utils/request");
16
16
  // 考察能力列表
17
17
  var PostQuestionCollectionList = function () { return (0, request_1.POST)({ url: '/standard/b/questionCollection/list' }); };
@@ -29,3 +29,6 @@ exports.GetAiDefine = GetAiDefine;
29
29
  // 获取考察能力详情
30
30
  var GetAbilityDetail = function (data) { return (0, request_1.POST)({ url: '/standard/b/questionCollection', data: data }); };
31
31
  exports.GetAbilityDetail = GetAbilityDetail;
32
+ // 能力名称查重
33
+ var CheckDuplicateCollection = function (data) { return (0, request_1.POST)({ url: '/standard/b/questionCollection/checkDuplicateCollection', data: data }); };
34
+ exports.CheckDuplicateCollection = CheckDuplicateCollection;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.32",
3
+ "version": "1.2.34-beta.0",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",