|
|
@@ -187,6 +187,21 @@ export function formatDictFontColor(options: Array<any>, value: string) {
|
|
|
return matchItem && matchItem['fontColor'] ? matchItem['fontColor'] : '';
|
|
|
}
|
|
|
|
|
|
+// 获取字段前缀颜色
|
|
|
+export function formatDictPreColor(options: Array<any>, value: string) {
|
|
|
+ if (!value) {
|
|
|
+ if (value != '0') {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!options) {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ let matchItem = '';
|
|
|
+ matchItem = options.find(item => item['value'] == value);
|
|
|
+ return matchItem && matchItem['prefixColor'] ? matchItem['prefixColor'] : '';
|
|
|
+}
|
|
|
+
|
|
|
// 获取字典数组
|
|
|
export function formatDictTags(options: Array<any>, value: Array<any>) {
|
|
|
if (!value.length) {
|