import bus from "../utils/bus";
import {sexOptions, SendStatusOptions, ClaimsStatusOptions} from '@/utils/utilsdictOptions.js'

// 全局混入将会影响每个单文件组件，请慎重思考是否要混入
export default {
  data() {
    return {
      bus,
    };
  },
  filters: {
		//过滤性别
	  formatSex(val){
			if (!val) {
			  return;
			}
			const item = sexOptions.find((item) => {
			  return item.value == val;
			});
			return item? item.name: "";
		},
		//过滤寄送状态
	  formatSendStatus(val){
			if (!val) {
			  return;
			}
			const item = SendStatusOptions.find((item) => {
			  return item.value == val;
			});
			return item? item.name: "";
		},
		//过滤理赔状态
	  formatClaimsStatus(val){
			if (!val) {
			  return;
			}
			const item = ClaimsStatusOptions.find((item) => {
			  return item.value == val;
			});
			return item? item.name: "";
		},
  }
};
