|
|
|
|
@ -64,7 +64,7 @@
|
|
|
|
|
</div> |
|
|
|
|
<div class="col col-6" v-if="negative.sourceType === '2' && negative.currentRow?.tag"> |
|
|
|
|
<label>标签</label> |
|
|
|
|
<span>{{ getDictLable(dict.sfssTags, negative.currentRow.tag) }}</span> |
|
|
|
|
<span>{{ getDictLabel(dict.sfssTags, negative.currentRow.tag) }}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col col-6" v-if="negative.sourceType === '2' && negative.currentRow?.handleMethod"> |
|
|
|
|
<label>办理方式</label> |
|
|
|
|
@ -102,6 +102,37 @@ const dict = catchSotre.getDicts([
|
|
|
|
|
"specialSupervision", "suspectProblem", "yesNo", "sfssTags", "handleMethodType" |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
function getDictLabel(list, value) { |
|
|
|
|
if (!Array.isArray(list)) return '/' |
|
|
|
|
|
|
|
|
|
if (value === null || value === undefined || value === '') return '/' |
|
|
|
|
|
|
|
|
|
let values = [] |
|
|
|
|
|
|
|
|
|
// 1️⃣ value 是数组 |
|
|
|
|
if (Array.isArray(value)) { |
|
|
|
|
values = value |
|
|
|
|
} |
|
|
|
|
// 2️⃣ value 是 "1,2,3" 这种字符串 |
|
|
|
|
else if (typeof value === 'string' && value.includes(',')) { |
|
|
|
|
values = value.split(',').map(v => v.trim()) |
|
|
|
|
} |
|
|
|
|
// 3️⃣ 单值(string / number) |
|
|
|
|
else { |
|
|
|
|
values = [value] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 4️⃣ 映射成字典中文 |
|
|
|
|
const labels = values |
|
|
|
|
.map(v => { |
|
|
|
|
const item = list.find(d => d.dictValue == v) |
|
|
|
|
return item?.dictLabel |
|
|
|
|
}) |
|
|
|
|
.filter(Boolean) |
|
|
|
|
|
|
|
|
|
return labels.length ? labels.join(',') : '/' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log('negative',negative) |
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|