pro-components
pro-components copied to clipboard
🐛[BUG]ProformSelect request 请求下拉框数据重复
trafficstars
🐛 bug 描述
使用ProFormSelect的request属性调用接口获取下啦框数据,前几条数据正常,后面的数据重复展示,但是接口返回数据是正确的


控制台应该有报错,猜测是 value (key)重复导致的
@drizzlesconsin 感谢回复,但是控制台确实没有报错,value/key也没重复
检查返回的数据,会不会跟 useCache 有关
@drizzlesconsin 我去掉了useCache还是无效 JSON是这样的:
{
"searchValue":null,
"createBy":null,
"createDate":null,
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"2",
"tenantId":"1",
"featureCode":"customer_is_deleted",
"name":"海尔客户作废标记",
"featureType":"2",
"factorType":"2",
"valueType":"1",
"defaultValue":null,
"enumValue":null,
"scriptContent":"select is_deleted from t_ds2ais_mdm_customer_data where customer_code='${customerCode}'",
"datasourceId":"2",
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":null,
"createDate":null,
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"1528998707935539201",
"tenantId":"1",
"featureCode":"HCIM_00",
"name":"推荐授信额度",
"featureType":"2",
"factorType":"1",
"valueType":"2",
"defaultValue":null,
"enumValue":null,
"scriptContent":"HCIM_01>HCIM_02?HCIM_01:HCIM_02",
"datasourceId":null,
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":null,
"createDate":"2022-07-27T16:08:54.000+08:00",
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"1539899176719368194",
"tenantId":"1",
"featureCode":"customerName_ifag",
"name":"根据客户名称返回状态",
"featureType":"2",
"factorType":"2",
"valueType":"1",
"defaultValue":null,
"enumValue":"",
"scriptContent":"select customer_code from t_ds2ais_mdm_customer_data where customer_name ='${customerName}' LIMIT 1",
"datasourceId":"2",
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":null,
"createDate":"2022-07-27T16:08:45.000+08:00",
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"1539899301420220418",
"tenantId":"1",
"featureCode":"tax_code_ifag",
"name":"根据统一信用代码返回状态",
"featureType":"2",
"factorType":"2",
"valueType":"1",
"defaultValue":null,
"enumValue":"",
"scriptContent":"select customer_code from t_ds2ais_mdm_customer_data where tax_code ='${tax_code}' LIMIT 1",
"datasourceId":"2",
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":null,
"createDate":null,
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"1541722114359697409",
"tenantId":"1",
"featureCode":"bx_jd_ifnull",
"name":"报销单据校验",
"featureType":"2",
"factorType":"2",
"valueType":"3",
"defaultValue":null,
"enumValue":"",
"scriptContent":"select bx_jd_ifnull from tb_test_bx where bx_code='${bx_code}'",
"datasourceId":"2",
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":null,
"createDate":null,
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"1541722190230462466",
"tenantId":"1",
"featureCode":"bx_if_ys",
"name":"报销是否超预算",
"featureType":"2",
"factorType":"2",
"valueType":"3",
"defaultValue":null,
"enumValue":"",
"scriptContent":"select bx_if_ys from tb_test_bx where bx_code='${bx_code}'",
"datasourceId":"2",
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":null,
"createDate":null,
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"1541722261621710849",
"tenantId":"1",
"featureCode":"bx_dj_jy",
"name":"报销单据明细金额与总金额校验",
"featureType":"2",
"factorType":"2",
"valueType":"3",
"defaultValue":null,
"enumValue":"",
"scriptContent":"select bx_dj_jy from tb_test_bx where bx_code='${bx_code}'",
"datasourceId":"2",
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":"admin",
"createDate":"2022-07-26T17:09:02.000+08:00",
"modifiedBy":"admin",
"modifiedDate":"2022-07-26T17:09:08.000+08:00",
"remark":null,
"params":{
},
"id":"1551857109614694401",
"tenantId":"1",
"featureCode":"bx_if_ys2022",
"name":"TESTJDBC",
"featureType":"2",
"factorType":"2",
"valueType":"5",
"defaultValue":null,
"enumValue":"111,22,333",
"scriptContent":"select list_key from tb_config_list where list_key='${list_key}'",
"datasourceId":null,
"ifUsedCache":"0",
"cacheExpires":null,
"status":"0",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":"admin",
"createDate":"2022-07-26T17:09:08.000+08:00",
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"1551857135317389313",
"tenantId":"1",
"featureCode":"bx_if_ys2022",
"name":"TESTJDBC",
"featureType":"2",
"factorType":"2",
"valueType":"5",
"defaultValue":null,
"enumValue":"111,22,333",
"scriptContent":"select list_key from tb_config_list where list_key='${list_key}'",
"datasourceId":null,
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"2",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":"admin",
"createDate":"2022-07-26T17:11:13.000+08:00",
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"1551857660347781122",
"tenantId":"1",
"featureCode":"bx_jd_if20227",
"name":"TESTEXPRESS",
"featureType":"2",
"factorType":"1",
"valueType":"5",
"defaultValue":null,
"enumValue":"45,56",
"scriptContent":"('${DEF_000006}'+'${CUST_000021}')<('${CUST_000004}'+'${DEF_000004}')? '异常':'正常'",
"datasourceId":"1",
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":"admin",
"createDate":"2022-07-26T17:17:59.000+08:00",
"modifiedBy":null,
"modifiedDate":null,
"remark":"wwww",
"params":{
},
"id":"1551859363558170625",
"tenantId":"1",
"featureCode":"bx_dj_jy2022",
"name":"TESTHTTP",
"featureType":"2",
"factorType":"3",
"valueType":"5",
"defaultValue":null,
"enumValue":"111,222",
"scriptContent":null,
"datasourceId":null,
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":"admin",
"createDate":"2022-07-26T17:21:53.000+08:00",
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"1551860343083343873",
"tenantId":"1",
"featureCode":"sfdsdf",
"name":"sdfs",
"featureType":"2",
"factorType":"1",
"valueType":"4",
"defaultValue":null,
"enumValue":"",
"scriptContent":"('${DEF_000006}'+'${CUST_000021}')<('${CUST_000004}'+'${DEF_000004}')? '异常':'正常'",
"datasourceId":"1",
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":"admin",
"createDate":"2022-07-26T17:22:52.000+08:00",
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"1551860593231634433",
"tenantId":"1",
"featureCode":"sadas",
"name":"dsa",
"featureType":"2",
"factorType":"2",
"valueType":"2",
"defaultValue":null,
"enumValue":"",
"scriptContent":"",
"datasourceId":null,
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
},
{
"searchValue":null,
"createBy":"admin",
"createDate":"2022-07-26T17:26:14.000+08:00",
"modifiedBy":null,
"modifiedDate":null,
"remark":null,
"params":{
},
"id":"1551861440015466497",
"tenantId":"1",
"featureCode":"hjhjk",
"name":"sssss",
"featureType":"2",
"factorType":"1",
"valueType":"3",
"defaultValue":null,
"enumValue":"",
"scriptContent":"('${DEF_000006}'+'${CUST_000021}')<('${CUST_000004}'+'${DEF_000004}')? '异常':'正常'",
"datasourceId":"1",
"ifUsedCache":"0",
"cacheExpires":null,
"status":"1",
"version":"1",
"ifEndCheck":"1",
"nextCheckUser":null
}
]
数据的问题,featureCode bx_if_ys2022 有重复的值。
数据的问题,featureCode
bx_if_ys2022有重复的值。
数据重复导致的bug数不胜数😌