|
|
@@ -474,28 +474,30 @@ const queryList = (pageNo, pageSize) => {
|
|
|
// 如果是enum类型,且description不为null,则根据description获取对应字典项数组,赋值给enumList
|
|
|
if (nonSumItem.type == "enum" && nonSumItem.description) {
|
|
|
console.log("🚀 ~ onSumItem.description:");
|
|
|
- nonSumItem.enumList =
|
|
|
+ const dictOptions =
|
|
|
nonSumItem.name === "非生产原因"
|
|
|
- ? getIntDictOptions(nonSumItem.description).map(
|
|
|
- (dict) => {
|
|
|
- return {
|
|
|
- ...dict,
|
|
|
- text: dict.label,
|
|
|
- };
|
|
|
- }
|
|
|
- )
|
|
|
- : getStrDictOptions(nonSumItem.description).map(
|
|
|
- (dict) => {
|
|
|
- return {
|
|
|
- ...dict,
|
|
|
- text: dict.label,
|
|
|
- };
|
|
|
- }
|
|
|
- );
|
|
|
- console.log(
|
|
|
- "🚀 ~ nonSumItem.enumList:",
|
|
|
- nonSumItem.enumList
|
|
|
- );
|
|
|
+ ? getIntDictOptions(nonSumItem.description)
|
|
|
+ : getStrDictOptions(nonSumItem.description);
|
|
|
+
|
|
|
+ nonSumItem.enumList = dictOptions.map((dict) => {
|
|
|
+ return {
|
|
|
+ ...dict,
|
|
|
+ text: dict.label,
|
|
|
+ };
|
|
|
+ });
|
|
|
+
|
|
|
+ // 确保 fillContent 的类型与 enumList 中的 value 类型匹配
|
|
|
+ if (nonSumItem.name === "非生产原因") {
|
|
|
+ // 如果是"非生产原因",将 fillContent 转换为数字类型以匹配 getIntDictOptions
|
|
|
+ if (
|
|
|
+ nonSumItem.fillContent !== null &&
|
|
|
+ nonSumItem.fillContent !== ""
|
|
|
+ ) {
|
|
|
+ nonSumItem.fillContent = parseInt(nonSumItem.fillContent);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log("🚀 ~ nonSumItem.enumList:", nonSumItem.enumList);
|
|
|
}
|
|
|
});
|
|
|
}
|