空值不进行回显数据字典

master
RuoYi 3 years ago
parent 10ae0bce65
commit c9d19cbe56

@ -1,3 +1,5 @@
/**
* 通用js方法封装处理
* Copyright (c) 2019 ruoyi
@ -16,7 +18,7 @@ export function parseTime(time, pattern) {
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
time = parseInt(time)
} else if (typeof time === 'string') {
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm),'');
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
}
if ((typeof time === 'number') && (time.toString().length === 10)) {
time = time * 1000
@ -80,6 +82,9 @@ export function selectDictLabel(datas, value) {
// 回显数据字典(字符串数组)
export function selectDictLabels(datas, value, separator) {
if(value === undefined) {
return "";
}
var actions = [];
var currentSeparator = undefined === separator ? "," : separator;
var temp = value.split(currentSeparator);
@ -124,7 +129,7 @@ export function mergeRecursive(source, target) {
} else {
source[p] = target[p];
}
} catch(e) {
} catch (e) {
source[p] = target[p];
}
}

Loading…
Cancel
Save