|
@@ -497,11 +497,16 @@ $(function () {
|
|
|
|
|
|
if (firstDataItem && firstDataItem.codeRelationList && Array.isArray(firstDataItem.codeRelationList)) {
|
|
|
// 提取 codeRelationList 数组中每一项的 code 值
|
|
|
- let codeList = firstDataItem.codeRelationList.map(function(item) {
|
|
|
- return item.code;
|
|
|
- }).filter(function(code) {
|
|
|
- return code && code.trim() !== '';
|
|
|
- });
|
|
|
+ let codeList = firstDataItem.codeRelationList
|
|
|
+ .filter(function(item) {
|
|
|
+ return item.codeLevel === "2";
|
|
|
+ })
|
|
|
+ .map(function(item) {
|
|
|
+ return item.code;
|
|
|
+ })
|
|
|
+ .filter(function(code) {
|
|
|
+ return code && code.trim() !== '';
|
|
|
+ });
|
|
|
|
|
|
// 将提取的 code 值用换行符连接
|
|
|
newTraceCodes = codeList.join('\n');
|