function pollutionList() { return [ { label: '优', value: 1 }, { label: '良', value: 2 }, { label: '轻度污染', value: 3 }, { label: '中度污染', value: 4 }, { label: '重度污染', value: 5 } ]; } function pollutionName(type) { return pollutionList().find((v) => v.value == type).label; } export { pollutionList, pollutionName };