Home > front end >  Js how to pick up to more than one dictionary table value
Js how to pick up to more than one dictionary table value

Time:09-24

A springboot project in hand, on the first business layer code



Then I am now from the business layer by
 var itemCodes=[[${@ dict. GetType (' test_job ')}]]. 

To the values in the dict_type corresponding dict_lable

Finally,
 field: 'itemCode, 
Title: 'overhaul project coding,
The formatter: function (value, item, index) {
Return the $. Table. SelectDictLabel (itemCodes, item. ItemCode);
}

Dictlabel displayed each data value, but now I have more than one dictType need to display, such as is shown above test_job thing, I also need gcs_job, eol_job, turn to the great god how to write

CodePudding user response:

Access to all then into an array and returns to the web

CodePudding user response:

Look at your dictionary is how to design a
 
{
"Description" : ", "
"DictCode" : "00020008",
"DictName" : "JND,"
"DictNameCn" : "Canada,"
"DictType" : "HJ_DM,"
"Filter" : ", "
"Isvalid" : "1",
"ParentCode" : "0002",
"Seq" : "6",
"UploadCode" : ", "
"UploadName" : "","
}, {
"Description" : ", "
"DictCode" : "000100010011",
"DictName", "SM",
"DictNameCn" : "sanming,"
"DictType" : "HJ_DM,"
"Filter" : ", "
"Isvalid" : "1",
"ParentCode" : "00010001",
"Seq" : "7",
"UploadCode" : ", "
"UploadName" : "","
}, {
"Description" : ", "
"DictCode" : "000100020007",
"DictName" : "ZQS,"
"DictNameCn", "chongqing",
"DictType" : "HJ_DM,"
"Filter" : ", "
"Isvalid" : "1",
"ParentCode" : "00010002",
"Seq" : "7",
"UploadCode" : ", "
"UploadName" : "","
},

As part of a dictionary

And then the front dictionary. Get ({STR: 'HJ_DM})}

Like this
  • Related