Commit 776827b47115aba7d4b1bb462064c282e631bed8

Authored by 陈洋
1 parent 484f3cb6

代码优化 添加字段

... ... @@ -202,6 +202,10 @@
202 202 display: none;
203 203 }
204 204
  205 + .ant-popover-inner {
  206 + padding: 0;
  207 + }
  208 +
205 209 .ant-popover-inner-content {
206 210 padding: 0;
207 211 }
... ...
... ... @@ -84,7 +84,7 @@ export interface ColsTreeProps extends DataNode {
84 84
85 85 export interface ColSelectProps {
86 86 //请求参数,单选多选查询选项等
87   - params?: { appCode?: string; funCode: string; useId?: boolean };
  87 + params?: { appCode?: string; funCode?: string; useId?: boolean };
88 88 extract?: any;
89 89 value: MappingValueProps[];
90 90 //字段code or id
... ... @@ -155,6 +155,7 @@ export interface paramColSelectProps extends ColSelectProps {
155 155 dateSelected?: any; // 时间可选 日期字段
156 156 iconText?: string; // Popover-icon 自定义 后面跟随文本
157 157 allowClear?: boolean;
  158 + popupOnBody?: boolean; // 下拉 跟随 body 还是自身
158 159 }
159 160
160 161 export const QxFieldSetter: React.FC<paramColSelectProps> = ({
... ... @@ -231,7 +232,7 @@ export const QxFieldSetter: React.FC<paramColSelectProps> = ({
231 232 }
232 233
233 234 request(params.appCode ? params.appCode : 'id', params.funCode, _data).then((res: any) => {
234   - if (res) {
  235 + if (!!res?.length) {
235 236 setOptions(
236 237 res.filter((item: any) => {
237 238 item.code = item.code.toString();
... ... @@ -1269,7 +1270,11 @@ export const QxFieldSetter: React.FC<paramColSelectProps> = ({
1269 1270 <Select
1270 1271 key={props.field}
1271 1272 getPopupContainer={(triggerNode) => {
1272   - return triggerNode;
  1273 + if (props?.popupOnBody) {
  1274 + return document.body;
  1275 + } else {
  1276 + return triggerNode;
  1277 + }
1273 1278 }}
1274 1279 className={'select qx-filter-select' + (colsTree ? '' : 'full')}
1275 1280 mode={
... ... @@ -1369,7 +1374,11 @@ export const QxFieldSetter: React.FC<paramColSelectProps> = ({
1369 1374 <Select
1370 1375 className={'select ' + (colsTree ? '' : 'full')}
1371 1376 getPopupContainer={(triggerNode) => {
1372   - return triggerNode;
  1377 + if (props?.popupOnBody) {
  1378 + return document.body;
  1379 + } else {
  1380 + return triggerNode;
  1381 + }
1373 1382 }}
1374 1383 placeholder="请选择"
1375 1384 mode={Boolean(isMultiple) ? 'multiple' : undefined}
... ...
... ... @@ -680,6 +680,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
680 680 colsTree={props.nodeItem}
681 681 isMultiple={false}
682 682 onChange={(val) => changeField(val, nodeData)}
  683 + popupOnBody={true}
683 684 />
684 685 </div>
685 686 )}
... ...
... ... @@ -187,7 +187,10 @@ const UserSelectorDialog: React.FC<UserSelectorDialogProps> = (props) => {
187 187 <Tooltip
188 188 placement="top"
189 189 title={
190   - <div>
  190 + <div style={{
  191 + fontSize: 14,
  192 + fontWeight: 400,
  193 + }}>
191 194 搜索规则
192 195 <br />
193 196 1、在按部门状态下,搜索的是人员的:姓名,工号或岗位 <br />
... ...