123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- const STATUS_CONFIGE = {
- care_apply_status: [{
- dictCode: 119,
- dictLabel: "待指派人员",
- dictSort: 0,
- dictType: "care_apply_status",
- dictValue: "wait_assign_nurse"
- },
- {
- dictCode: 110,
- dictLabel: "待审核",
- dictSort: 1,
- dictType: "care_apply_status",
- dictValue: "wait_check"
- },
- {
- dictCode: 111,
- dictLabel: "已同意",
- dictSort: 2,
- dictType: "care_apply_status",
- dictValue: "agree"
- },
- {
- dictCode: 112,
- dictLabel: "不同意",
- dictSort: 3,
- dictType: "care_apply_status",
- dictValue: "disagree"
- },
- {
- dictCode: 113,
- dictLabel: "待指派公司",
- dictSort: 4,
- dictType: "care_apply_status",
- dictValue: "wait_assign_company"
- },
- {
- dictCode: 114,
- dictLabel: "已指派",
- dictSort: 5,
- dictType: "care_apply_status",
- dictValue: "assigned"
- },
- {
- dictCode: 121,
- dictLabel: "未送审",
- dictSort: 6,
- dictType: "care_apply_status",
- dictValue: "no_check"
- }
- ],
- sys_user_sex: [{
- dictCode: 1,
- dictLabel: "男",
- dictSort: 1,
- dictType: "sys_user_sex",
- dictValue: "0"
- }, {
- dictCode: 2,
- dictLabel: "女",
- dictSort: 2,
- dictType: "sys_user_sex",
- dictValue: "1"
- }, {
- dictCode: 3,
- dictLabel: "未知",
- dictSort: 3,
- dictType: "sys_user_sex",
- dictValue: "2"
- }],
- pay_status: [{
- dictCode: 117,
- dictLabel: "未结算",
- dictSort: 1,
- dictType: "pay_status",
- dictValue: "dis_pay"
- }, {
- dictCode: 118,
- dictLabel: "已结算",
- dictSort: 2,
- dictType: "pay_status",
- dictValue: "is_pay"
- }],
- deal_status: [{
- dictCode: 120,
- dictLabel: "未开始",
- dictSort: 0,
- dictType: "deal_status",
- dictValue: "no_start"
- }, {
- dictCode: 115,
- dictLabel: "进行中",
- dictSort: 1,
- dictType: "deal_status",
- dictValue: "in_progress"
- }, {
- dictCode: 116,
- dictLabel: "已完成",
- dictSort: 2,
- dictType: "deal_status",
- dictValue: "complete"
- }]
- }
- export function getDict(dbName = 'deal_status', query = {}) {
- if (typeof dbName !== 'string' && typeof query !== 'object') return {};
- if (Object.keys(query).length === 0) return {};
- let dbData = STATUS_CONFIGE[dbName];
- let distRes = {};
- // console.log('dbData=>', dbData);
- dbData.some((dict) => {
- let bool = true;
- for (var key in query) {
- if (dict.hasOwnProperty(key)) {
- if (query[key] != dict[key]) {
- bool = false;
- }
- } else {
- bool = false;
- }
- }
- if (bool) {
- distRes = dict;
- return bool;
- }
- })
- return distRes;
- }
|