refator: 代码规范

This commit is contained in:
chenjianxing 2021-05-07 14:59:01 +08:00 committed by jianxing
parent 4e677b5e3b
commit ed898fe71e
2 changed files with 17 additions and 25 deletions

View File

@ -4,17 +4,9 @@ import io.metersphere.commons.exception.MSException;
import io.metersphere.i18n.Translator;
import org.apache.commons.collections.CollectionUtils;
import org.aspectj.util.FileUtil;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
import java.util.Date;
import java.util.List;
public class FileUtils {

View File

@ -53,6 +53,23 @@ export function parseCase(item, dataMap, isDisable, setParamCallback) {
return nodeItem;
}
function _parseChildren(children, k, v, isDisable) {
if (k) {
let node = {
data: {
text: k,
resource: v ? [v] : []
},
children: []
}
if (isDisable) {
node.data.disable = true;
}
children.push(node);
return node;
}
}
function parseChildren(nodeItem, item, isDisable) {
nodeItem.children = [];
let children = [];
@ -79,23 +96,6 @@ function parseChildren(nodeItem, item, isDisable) {
nodeItem.children = children;
}
function _parseChildren(children, k, v, isDisable) {
if (k) {
let node = {
data: {
text: k,
resource: v ? [v] : []
},
children: []
}
if (isDisable) {
node.data.disable = true;
}
children.push(node);
return node;
}
}
export function listenNodeSelected(callback) {
let minder = window.minder;
minder.on('selectionchange ', function (even) {