Commit b928c284 authored by 沈翠玲's avatar 沈翠玲

字典改成调用接口

parent 96f8b634
...@@ -11,3 +11,7 @@ export const getMenuTree = (params) => { ...@@ -11,3 +11,7 @@ export const getMenuTree = (params) => {
export const deleteMenus = (ids) => { export const deleteMenus = (ids) => {
return request.get('/menu/batchDeleteByIds', { ids }); return request.get('/menu/batchDeleteByIds', { ids });
}; };
export const getDictByCode = (code) => {
return request.get('/system/codeList', { code });
};
import { useDictStore } from '@/stores/modules/dict';
import { ref, toRefs } from 'vue';
import { getDictByCode } from '@/api/menu';
const dictStore = useDictStore();
export const useDict = (...args) => {
const res = ref({});
return (() => {
args.forEach(async (dictType, index) => {
res.value[dictType] = [];
const dicts = await dictStore.getDict(dictType);
if (dicts) {
res.value[dictType] = dicts;
} else {
getDictByCode(dictType).then(resp => {
res.value[dictType] = resp.result.map(d => ({
label: d.desc,
value: d.value
}));
dictStore.setDict({ key: dictType, value: res.value[dictType] });
});
}
});
return toRefs(res.value);
})();
};
\ No newline at end of file
import { defineStore } from 'pinia';
export const useDictStore = defineStore({
id: 'dict',
state: () => ({
dict: []
}),
actions: {
// 获取字典
getDict(_key) {
if (_key == null || _key === "") {
return null;
}
try {
for (let i = 0; i < this.dict.length; i++) {
let item = this.dict[i];
if (item.key === _key) {
return item.value;
}
}
} catch (e) {
return null;
}
return null; // 如果未找到对应的字典项,返回null
},
// 设置字典
setDict({ key, value }) {
if (key !== null && key !== "") {
this.dict.push({ key, value });
}
},
// 删除字典
removeDict(_key) {
let removed = false;
try {
for (let i = 0; i < this.dict.length; i++) {
if (this.dict[i].key === _key) {
this.dict.splice(i, 1);
removed = true;
break; // 找到并移除后直接退出循环
}
}
} catch (e) {
removed = false;
}
return removed;
},
// 清空字典
cleanDict() {
this.dict = []; // 直接赋空数组即可清空字典
}
},
});
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
import callDrawer from './components/callDrawer.vue'; import callDrawer from './components/callDrawer.vue';
import { Download } from '@element-plus/icons-vue'; import { Download } from '@element-plus/icons-vue';
import { getTenantPage } from '@/api/tenant'; import { getTenantPage } from '@/api/tenant';
import { useDict } from '@/hooks/useDict';
import { inject } from 'vue'; import { inject } from 'vue';
const { AuditStatus, FollowStatus, PhoneResultStatus, CaseStatus } = useDict("AuditStatus", "FollowStatus", "PhoneResultStatus", "CaseStatus");
const envs = getAppEnvConfig(); const envs = getAppEnvConfig();
const downloadfile = inject('download'); const downloadfile = inject('download');
const ProTableRef = ref(); const ProTableRef = ref();
...@@ -77,13 +79,7 @@ ...@@ -77,13 +79,7 @@
const name = item.slice(item.lastIndexOf('/') + 1, item.length); const name = item.slice(item.lastIndexOf('/') + 1, item.length);
downloadfile('/sys/static/' + item, {}, name); downloadfile('/sys/static/' + item, {}, name);
}; };
const auditStatusOpt = [
{ label: '未稽核', value: 'un_audit' },
{ label: '稽核中', value: 'audit' },
{ label: '已拒绝', value: 'rejected' },
{ label: '已完成', value: 'complete' },
{ label: '稽核通过', value: 'passed' },
];
const changeStatus = async () => { const changeStatus = async () => {
showModal.value = true; showModal.value = true;
}; };
...@@ -106,42 +102,6 @@ ...@@ -106,42 +102,6 @@
callMode.value = type; callMode.value = type;
callDrawerRef.value.openModal(JSON.parse(JSON.stringify(row))); callDrawerRef.value.openModal(JSON.parse(JSON.stringify(row)));
}; };
const followStatusOpt = [
{ label: '接通后挂断', value: 'hang_up' },
{ label: '接通有实质进展', value: 'progress' },
{ label: '接通有效转告', value: 'pass_on' },
{ label: '接通拒绝转告', value: 'no_pass' },
{ label: '接听后挂断', value: 'Hang_up_after_answering' },
{ label: '接通无应答', value: 'No_response_when_connected' },
{ label: '称与债人无关', value: 'Claims_unrelated_to_creditors' },
{ label: '称非本人', value: 'Claiming_not_to_be_myself' },
{ label: '无人接听', value: 'no_answer' },
{ label: '关机', value: 'Shutdown' },
{ label: '空号', value: 'dead_number' },
{ label: '占线/忙音/正在通话中', value: 'Busy' },
{ label: '停机', value: 'closing_down' },
{ label: '机器人回复', value: 'Robot_reply' },
{ label: '微信', value: 'WeChat' },
{ label: '短信', value: 'short_message' },
{ label: 'QQ', value: 'QQ' },
{ label: '飞书', value: 'fly' },
{ label: '钉钉', value: 'DING' },
];
const phoneResultStatusOpt = [
{ label: '后续再跟进', value: 'later' },
{ label: '承诺还款', value: 'Promise_Repayment' },
{ label: '暂无还款意愿', value: 'No_Repay' },
{ label: '要求停催', value: 'Stop_Urging' },
{ label: '情绪激动抗拒', value: 'resistance' },
{ label: '拒绝还款', value: 'Refuse_Repayment' },
{ label: '已还款', value: 'Repaired' },
{ label: '代履行还款', value: 'repayment_others' },
];
const caseStatusOpt = [
{ label: '正常', value: 'normal' },
{ label: '撤案', value: 'withdraw' },
{ label: '留案', value: 'stay' },
];
const paramCallback = (param) => { const paramCallback = (param) => {
const obj = JSON.parse(JSON.stringify(param)); const obj = JSON.parse(JSON.stringify(param));
obj['auditStatus'] = 'complete'; obj['auditStatus'] = 'complete';
...@@ -259,7 +219,7 @@ ...@@ -259,7 +219,7 @@
title: '拨打跟进结果', title: '拨打跟进结果',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 120, width: 120,
enum: followStatusOpt, enum: FollowStatus,
search: { search: {
el: 'select', el: 'select',
props: { filterable: true, multiple: true, 'collapse-tags': true }, props: { filterable: true, multiple: true, 'collapse-tags': true },
...@@ -278,7 +238,7 @@ ...@@ -278,7 +238,7 @@
return ( return (
<> <>
{row.followStatus {row.followStatus
? followStatusOpt.find((v) => v.value === row.followStatus).label ? FollowStatus.value?.find((v) => v.value === row.followStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -290,7 +250,7 @@ ...@@ -290,7 +250,7 @@
title: '拨打处置状态', title: '拨打处置状态',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 120, width: 120,
enum: phoneResultStatusOpt, enum: PhoneResultStatus,
search: { el: 'select', props: { filterable: true }, labelWidth: 78 }, search: { el: 'select', props: { filterable: true }, labelWidth: 78 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
...@@ -298,7 +258,7 @@ ...@@ -298,7 +258,7 @@
return ( return (
<> <>
{row.phoneResultStatus {row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label ? PhoneResultStatus.value?.find((v) => v.value === row.phoneResultStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -315,7 +275,7 @@ ...@@ -315,7 +275,7 @@
return ( return (
<> <>
{row.auditStatus {row.auditStatus
? auditStatusOpt.find((v) => v.value === row.auditStatus).label ? AuditStatus.value?.find((v) => v.value === row.auditStatus)?.label
: ''} : ''}
</> </>
); );
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<td> <td>
{{ {{
item?.caseStatus item?.caseStatus
? caseStatusOpt.find((v) => v.value === item?.caseStatus).label ? CaseStatus.find((v) => v.value === item?.caseStatus)?.label
: '' : ''
}}</td }}</td
> >
...@@ -80,13 +80,13 @@ ...@@ -80,13 +80,13 @@
<td class="label">跟进结果</td> <td class="label">跟进结果</td>
<td>{{ <td>{{
item?.followStatus item?.followStatus
? followStatusOpt.find((v) => v.value === item?.followStatus).label ? FollowStatus.find((v) => v.value === item?.followStatus)?.label
: '' : ''
}}</td> }}</td>
<td class="label">跟进状态</td> <td class="label">跟进状态</td>
<td>{{ <td>{{
item?.phoneResultStatus item?.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === item?.phoneResultStatus) ? PhoneResultStatus.find((v) => v.value === item?.phoneResultStatus)
.label .label
: '' : ''
}}</td> }}</td>
...@@ -139,6 +139,8 @@ ...@@ -139,6 +139,8 @@
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import { ElMessageBox, ElMessage, ElButton } from 'element-plus'; import { ElMessageBox, ElMessage, ElButton } from 'element-plus';
import { getTenantPage } from '@/api/tenant'; import { getTenantPage } from '@/api/tenant';
import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus", "CaseStatus");
const ProTableRef = ref(); const ProTableRef = ref();
const showModal = ref(false); const showModal = ref(false);
...@@ -206,11 +208,6 @@ ...@@ -206,11 +208,6 @@
], ],
toolbarConfig: { enabled: false }, toolbarConfig: { enabled: false },
}); });
const flowStatusOpt = [
{ label: '待审核', value: 'pending' },
{ label: '通过', value: 'pass' },
{ label: '未通过', value: 'fail' },
];
const changeStatus = async () => { const changeStatus = async () => {
showModal.value = true; showModal.value = true;
}; };
...@@ -229,42 +226,7 @@ ...@@ -229,42 +226,7 @@
query(); query();
}; };
const followStatusOpt = [
{ label: '接通后挂断', value: 'hang_up' },
{ label: '接通有实质进展', value: 'progress' },
{ label: '接通有效转告', value: 'pass_on' },
{ label: '接通拒绝转告', value: 'no_pass' },
{ label: '接听后挂断', value: 'Hang_up_after_answering' },
{ label: '接通无应答', value: 'No_response_when_connected' },
{ label: '称与债人无关', value: 'Claims_unrelated_to_creditors' },
{ label: '称非本人', value: 'Claiming_not_to_be_myself' },
{ label: '无人接听', value: 'no_answer' },
{ label: '关机', value: 'Shutdown' },
{ label: '空号', value: 'dead_number' },
{ label: '占线/忙音/正在通话中', value: 'Busy' },
{ label: '停机', value: 'closing_down' },
{ label: '机器人回复', value: 'Robot_reply' },
{ label: '微信', value: 'WeChat' },
{ label: '短信', value: 'short_message' },
{ label: 'QQ', value: 'QQ' },
{ label: '飞书', value: 'fly' },
{ label: '钉钉', value: 'DING' },
];
const phoneResultStatusOpt = [
{ label: '后续再跟进', value: 'later' },
{ label: '承诺还款', value: 'Promise_Repayment' },
{ label: '暂无还款意愿', value: 'No_Repay' },
{ label: '要求停催', value: 'Stop_Urging' },
{ label: '情绪激动抗拒', value: 'resistance' },
{ label: '拒绝还款', value: 'Refuse_Repayment' },
{ label: '已还款', value: 'Repaired' },
{ label: '代履行还款', value: 'repayment_others' },
];
const caseStatusOpt = [
{ label: '正常', value: 'normal' },
{ label: '撤案', value: 'withdraw' },
{ label: '留案', value: 'stay' },
];
const config = computed(() => { const config = computed(() => {
return { return {
columns: [ columns: [
...@@ -403,7 +365,7 @@ ...@@ -403,7 +365,7 @@
title: '审核状态', title: '审核状态',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 80, width: 80,
enum: flowStatusOpt, enum: FlowStatus,
search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 }, search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
...@@ -411,7 +373,7 @@ ...@@ -411,7 +373,7 @@
return ( return (
<> <>
{row.flowStatus {row.flowStatus
? flowStatusOpt.find((v) => v.value === row.flowStatus).label ? FlowStatus.value?.find((v) => v.value === row.flowStatus)?.label
: ''} : ''}
</> </>
); );
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<td> <td>
{{ {{
item?.loan?.caseStatus item?.loan?.caseStatus
? caseStatusOpt.find((v) => v.value === item?.loan?.caseStatus).label ? CaseStatus?.find((v) => v.value === item?.loan?.caseStatus)?.label
: '' : ''
}}</td }}</td
> >
...@@ -70,15 +70,15 @@ ...@@ -70,15 +70,15 @@
<td class="label">跟进结果</td> <td class="label">跟进结果</td>
<td>{{ <td>{{
item?.loan?.followStatus item?.loan?.followStatus
? followStatusOpt.find((v) => v.value === item?.loan?.followStatus).label ? FollowStatus?.find((v) => v.value === item?.loan?.followStatus)?.label
: '' : ''
}}</td> }}</td>
<td class="label">跟进状态</td> <td class="label">跟进状态</td>
<td>{{ <td>{{
item?.loan?.phoneResultStatus item?.loan?.phoneResultStatus
? phoneResultStatusOpt.find( ? PhoneResultStatus?.find(
(v) => v.value === item?.loan?.phoneResultStatus (v) => v.value === item?.loan?.phoneResultStatus
).label )?.label
: '' : ''
}}</td> }}</td>
</tr> </tr>
...@@ -117,6 +117,9 @@ ...@@ -117,6 +117,9 @@
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import { ElMessageBox, ElMessage, ElButton } from 'element-plus'; import { ElMessageBox, ElMessage, ElButton } from 'element-plus';
import { getTenantPage } from '@/api/tenant'; import { getTenantPage } from '@/api/tenant';
import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus", "CaseStatus");
const ProTableRef = ref(); const ProTableRef = ref();
const showModal = ref(false); const showModal = ref(false);
...@@ -132,15 +135,6 @@ ...@@ -132,15 +135,6 @@
selectdList.value = []; selectdList.value = [];
} }
}; };
const reduceTypeOpt = [
{ label: '结清减免', value: 'settle' },
{ label: '分期减免', value: 'by_stages' },
];
const flowStatusOpt = [
{ label: '待审核', value: 'pending' },
{ label: '通过', value: 'pass' },
{ label: '未通过', value: 'fail' },
];
const changeStatus = async () => { const changeStatus = async () => {
showModal.value = true; showModal.value = true;
}; };
...@@ -159,42 +153,6 @@ ...@@ -159,42 +153,6 @@
query(); query();
}; };
const followStatusOpt = [
{ label: '接通后挂断', value: 'hang_up' },
{ label: '接通有实质进展', value: 'progress' },
{ label: '接通有效转告', value: 'pass_on' },
{ label: '接通拒绝转告', value: 'no_pass' },
{ label: '接听后挂断', value: 'Hang_up_after_answering' },
{ label: '接通无应答', value: 'No_response_when_connected' },
{ label: '称与债人无关', value: 'Claims_unrelated_to_creditors' },
{ label: '称非本人', value: 'Claiming_not_to_be_myself' },
{ label: '无人接听', value: 'no_answer' },
{ label: '关机', value: 'Shutdown' },
{ label: '空号', value: 'dead_number' },
{ label: '占线/忙音/正在通话中', value: 'Busy' },
{ label: '停机', value: 'closing_down' },
{ label: '机器人回复', value: 'Robot_reply' },
{ label: '微信', value: 'WeChat' },
{ label: '短信', value: 'short_message' },
{ label: 'QQ', value: 'QQ' },
{ label: '飞书', value: 'fly' },
{ label: '钉钉', value: 'DING' },
];
const phoneResultStatusOpt = [
{ label: '后续再跟进', value: 'later' },
{ label: '承诺还款', value: 'Promise_Repayment' },
{ label: '暂无还款意愿', value: 'No_Repay' },
{ label: '要求停催', value: 'Stop_Urging' },
{ label: '情绪激动抗拒', value: 'resistance' },
{ label: '拒绝还款', value: 'Refuse_Repayment' },
{ label: '已还款', value: 'Repaired' },
{ label: '代履行还款', value: 'repayment_others' },
];
const caseStatusOpt = [
{ label: '正常', value: 'normal' },
{ label: '撤案', value: 'withdraw' },
{ label: '留案', value: 'stay' },
];
const config = computed(() => { const config = computed(() => {
return { return {
columns: [ columns: [
...@@ -295,7 +253,7 @@ ...@@ -295,7 +253,7 @@
title: '减免类型', title: '减免类型',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 80, width: 80,
enum: reduceTypeOpt, enum: ReduceType,
search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 }, search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
...@@ -303,7 +261,7 @@ ...@@ -303,7 +261,7 @@
return ( return (
<> <>
{row.reduceType {row.reduceType
? reduceTypeOpt.find((v) => v.value === row.reduceType).label ? ReduceType.value?.find((v) => v.value === row.reduceType)?.label
: ''} : ''}
</> </>
); );
...@@ -315,7 +273,7 @@ ...@@ -315,7 +273,7 @@
title: '审核状态', title: '审核状态',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 80, width: 80,
enum: flowStatusOpt, enum: FlowStatus,
search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 }, search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
...@@ -323,7 +281,7 @@ ...@@ -323,7 +281,7 @@
return ( return (
<> <>
{row.flowStatus {row.flowStatus
? flowStatusOpt.find((v) => v.value === row.flowStatus).label ? FlowStatus.value?.find((v) => v.value === row.flowStatus)?.label
: ''} : ''}
</> </>
); );
......
...@@ -41,16 +41,12 @@ ...@@ -41,16 +41,12 @@
import { getRepairRecord, RepairRecordStatusByIds } from '@/api/property'; import { getRepairRecord, RepairRecordStatusByIds } from '@/api/property';
import { ElMessageBox, ElMessage, ElButton } from 'element-plus'; import { ElMessageBox, ElMessage, ElButton } from 'element-plus';
import { getTenantPage } from '@/api/tenant'; import { getTenantPage } from '@/api/tenant';
import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus", "CaseStatus");
const tabledata = ref([]); const tabledata = ref([]);
const showModal = ref(false); const showModal = ref(false);
const caseLRef = ref(); const caseLRef = ref();
const flowStatusOpt = [
{ label: '待审核', value: 'pending' },
// { label: '审核中', value: 'in_review' },
{ label: '通过', value: 'pass' },
{ label: '未通过', value: 'fail' },
];
const selectdList = ref([]); const selectdList = ref([]);
const onCheckboxChange = (row) => { const onCheckboxChange = (row) => {
console.log('row', row); console.log('row', row);
...@@ -204,14 +200,14 @@ ...@@ -204,14 +200,14 @@
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '审核状态', title: '审核状态',
width: 95, width: 95,
enum: flowStatusOpt, enum: FlowStatus,
search: { el: 'select', props: { filterable: true }, labelWidth: 95 }, search: { el: 'select', props: { filterable: true }, labelWidth: 95 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.flowStatus ? flowStatusOpt.find((v) => v.value === row.flowStatus).label : ''} {row.flowStatus ? FlowStatus.value?.find((v) => v.value === row.flowStatus)?.label : ''}
</> </>
); );
}, },
......
...@@ -40,7 +40,9 @@ ...@@ -40,7 +40,9 @@
import { getRepayRecordPage, repayRecordFlowStatusByIds } from '@/api/property'; import { getRepayRecordPage, repayRecordFlowStatusByIds } from '@/api/property';
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import { ElMessageBox, ElMessage, ElButton } from 'element-plus'; import { ElMessageBox, ElMessage, ElButton } from 'element-plus';
import { useDict } from '@/hooks/useDict';
import { getTenantPage } from '@/api/tenant';
const { RepayType, FlowStatus } = useDict("RepayType", "FlowStatus");
const ProTableRef = ref(); const ProTableRef = ref();
const showModal = ref(false); const showModal = ref(false);
const selectdList = ref([]); const selectdList = ref([]);
...@@ -55,25 +57,7 @@ ...@@ -55,25 +57,7 @@
selectdList.value = []; selectdList.value = [];
} }
}; };
const options = [
{
value: 'repay',
label: '直接还款',
},
{
value: 'by_stages',
label: '分期还款',
},
{
value: 'settle',
label: '结清减免还款',
},
];
const flowStatusOpt = [
{ label: '待审核', value: 'pending' },
{ label: '通过', value: 'pass' },
{ label: '未通过', value: 'fail' },
];
const changeStatus = async () => { const changeStatus = async () => {
showModal.value = true; showModal.value = true;
}; };
...@@ -209,13 +193,13 @@ ...@@ -209,13 +193,13 @@
field: 'repayType', field: 'repayType',
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '还款方式', title: '还款方式',
enum: options, enum: RepayType,
search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 }, search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<>{row.repayType ? options.find((v) => v.value === row.repayType).label : ''}</> <>{row.repayType ? RepayType.value?.find((v) => v.value === row.repayType)?.label : ''}</>
); );
}, },
}, },
...@@ -233,7 +217,7 @@ ...@@ -233,7 +217,7 @@
title: '审核状态', title: '审核状态',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 80, width: 80,
enum: flowStatusOpt, enum: FlowStatus,
search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 }, search: { el: 'select', props: { filterable: true }, span: 1, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
...@@ -241,7 +225,7 @@ ...@@ -241,7 +225,7 @@
return ( return (
<> <>
{row.flowStatus {row.flowStatus
? flowStatusOpt.find((v) => v.value === row.flowStatus).label ? FlowStatus.value?.find((v) => v.value === row.flowStatus)?.label
: ''} : ''}
</> </>
); );
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<el-tab-pane <el-tab-pane
:label="item.label" :label="item.label"
:name="item.value" :name="item.value"
v-for="(item, index) in auditStatusOpt" v-for="(item, index) in AuditStatus"
:key="index" :key="index"
></el-tab-pane> ></el-tab-pane>
</el-tabs> </el-tabs>
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
import { batchSave } from '@/api/audit'; import { batchSave } from '@/api/audit';
import { useUserStore } from '@/stores/modules/user'; import { useUserStore } from '@/stores/modules/user';
import { getTenantPage } from '@/api/tenant'; import { getTenantPage } from '@/api/tenant';
import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, AuditStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus","AuditStatus", "CaseStatus");
const envs = getAppEnvConfig(); const envs = getAppEnvConfig();
const { userInfo } = useUserStore(); const { userInfo } = useUserStore();
...@@ -64,44 +65,6 @@ ...@@ -64,44 +65,6 @@
selectdList.value = row.records; selectdList.value = row.records;
}; };
const followStatusOpt = [
{ label: '接通后挂断', value: 'hang_up' },
{ label: '接通有实质进展', value: 'progress' },
{ label: '接通有效转告', value: 'pass_on' },
{ label: '接通拒绝转告', value: 'no_pass' },
{ label: '接听后挂断', value: 'Hang_up_after_answering' },
{ label: '接通无应答', value: 'No_response_when_connected' },
{ label: '称与债人无关', value: 'Claims_unrelated_to_creditors' },
{ label: '称非本人', value: 'Claiming_not_to_be_myself' },
{ label: '无人接听', value: 'no_answer' },
{ label: '关机', value: 'Shutdown' },
{ label: '空号', value: 'dead_number' },
{ label: '占线/忙音/正在通话中', value: 'Busy' },
{ label: '停机', value: 'closing_down' },
{ label: '机器人回复', value: 'Robot_reply' },
{ label: '微信', value: 'WeChat' },
{ label: '短信', value: 'short_message' },
{ label: 'QQ', value: 'QQ' },
{ label: '飞书', value: 'fly' },
{ label: '钉钉', value: 'DING' },
];
const phoneResultStatusOpt = [
{ label: '后续再跟进', value: 'later' },
{ label: '承诺还款', value: 'Promise_Repayment' },
{ label: '暂无还款意愿', value: 'No_Repay' },
{ label: '要求停催', value: 'Stop_Urging' },
{ label: '情绪激动抗拒', value: 'resistance' },
{ label: '拒绝还款', value: 'Refuse_Repayment' },
{ label: '已还款', value: 'Repaired' },
{ label: '代履行还款', value: 'repayment_others' },
];
const auditStatusOpt = [
{ label: '未稽核', value: 'un_audit' },
{ label: '稽核中', value: 'audit' },
{ label: '已拒绝', value: 'rejected' },
{ label: '已完成', value: 'complete' },
{ label: '稽核通过', value: 'passed' },
];
const activeName = ref('un_audit'); const activeName = ref('un_audit');
const callMode = ref(''); const callMode = ref('');
const paramCallback = (param) => { const paramCallback = (param) => {
...@@ -241,7 +204,7 @@ ...@@ -241,7 +204,7 @@
title: '拨打跟进结果', title: '拨打跟进结果',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 120, width: 120,
enum: followStatusOpt, enum: FollowStatus,
search: { search: {
el: 'select', el: 'select',
props: { filterable: true, multiple: true, 'collapse-tags': true }, props: { filterable: true, multiple: true, 'collapse-tags': true },
...@@ -260,7 +223,7 @@ ...@@ -260,7 +223,7 @@
return ( return (
<> <>
{row.followStatus {row.followStatus
? followStatusOpt.find((v) => v.value === row.followStatus).label ? FollowStatus.value?.find((v) => v.value === row.followStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -272,7 +235,7 @@ ...@@ -272,7 +235,7 @@
title: '拨打处置状态', title: '拨打处置状态',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 120, width: 120,
enum: phoneResultStatusOpt, enum: PhoneResultStatus,
search: { el: 'select', props: { filterable: true }, labelWidth: 78 }, search: { el: 'select', props: { filterable: true }, labelWidth: 78 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
...@@ -280,7 +243,7 @@ ...@@ -280,7 +243,7 @@
return ( return (
<> <>
{row.phoneResultStatus {row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label ? PhoneResultStatus.value?.find((v) => v.value === row.phoneResultStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -297,7 +260,7 @@ ...@@ -297,7 +260,7 @@
return ( return (
<> <>
{row.auditStatus {row.auditStatus
? auditStatusOpt.find((v) => v.value === row.auditStatus).label ? AuditStatus.value?.find((v) => v.value === row.auditStatus)?.label
: ''} : ''}
</> </>
); );
......
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
return ( return (
<> <>
{row.distributeStatus {row.distributeStatus
? distributeStatusOpt.find((v) => v.value === row.distributeStatus).label ? distributeStatusOpt.find((v) => v.value === row.distributeStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -324,7 +324,7 @@ ...@@ -324,7 +324,7 @@
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.caseStatus ? caseStatusOpt.find((v) => v.value === row.caseStatus).label : ''} {row.caseStatus ? caseStatusOpt.find((v) => v.value === row.caseStatus)?.label : ''}
</> </>
); );
}, },
......
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
import { getPlatformPage } from '@/api/platform'; import { getPlatformPage } from '@/api/platform';
import { getManageOrgPage } from '@/api/manageOrg'; import { getManageOrgPage } from '@/api/manageOrg';
import { getTenantPage } from '@/api/tenant'; import { getTenantPage } from '@/api/tenant';
import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, DistributeStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus","DistributeStatus", "CaseStatus");
const caseLRef = ref(); const caseLRef = ref();
const selectdList = ref([]); const selectdList = ref([]);
const curParam = ref({}); const curParam = ref({});
...@@ -56,11 +58,6 @@ ...@@ -56,11 +58,6 @@
} }
}); });
}; };
const caseStatusOpt = [
{ label: '正常', value: 'normal' },
{ label: '撤案', value: 'withdraw' },
{ label: '留案', value: 'stay' },
];
const backCase = async () => { const backCase = async () => {
// 勾选的情况 // 勾选的情况
// if (selectdList.value && selectdList.value.length) { // if (selectdList.value && selectdList.value.length) {
...@@ -130,11 +127,6 @@ ...@@ -130,11 +127,6 @@
// getStatisis(obj); // getStatisis(obj);
return obj; return obj;
}; };
const distributeStatusOpt = [
{ label: '未分派', value: 'undistributed' },
{ label: '分派到调解中心', value: 'tenant' },
{ label: '分派到CPE', value: 'CPE' },
];
const onCheckboxAll = (flag) => { const onCheckboxAll = (flag) => {
if (flag.checked) { if (flag.checked) {
selectdList.value = flag.records; selectdList.value = flag.records;
...@@ -219,7 +211,7 @@ ...@@ -219,7 +211,7 @@
title: '分派状态', title: '分派状态',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 80, width: 80,
enum: distributeStatusOpt, enum: DistributeStatus,
search: { el: 'select', props: { filterable: true }, labelWidth: 78 }, search: { el: 'select', props: { filterable: true }, labelWidth: 78 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
...@@ -227,7 +219,7 @@ ...@@ -227,7 +219,7 @@
return ( return (
<> <>
{row.distributeStatus {row.distributeStatus
? distributeStatusOpt.find((v) => v.value === row.distributeStatus).label ? DistributeStatus.value?.find((v) => v.value === row.distributeStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -336,14 +328,14 @@ ...@@ -336,14 +328,14 @@
title: '案件状态', title: '案件状态',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 80, width: 80,
enum: caseStatusOpt, enum: CaseStatus,
// search: { el: 'select', props: { filterable: true }, labelWidth: 80 }, // search: { el: 'select', props: { filterable: true }, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.caseStatus ? caseStatusOpt.find((v) => v.value === row.caseStatus).label : ''} {row.caseStatus ? CaseStatus.value?.find((v) => v.value === row.caseStatus)?.label : ''}
</> </>
); );
}, },
......
...@@ -500,10 +500,10 @@ ...@@ -500,10 +500,10 @@
followStatus: resuleObj.childrenlabel, followStatus: resuleObj.childrenlabel,
remark: form.remark, remark: form.remark,
auditStatus: 'un_audit', auditStatus: 'un_audit',
voices: form.voices.map((v) => v.url).length > 0 ? form.voices.map((v) => v.url) : null, voices: form.voices.map((v) => v.url)?.length > 0 ? form.voices.map((v) => v.url) : null,
images: form.images.map((v) => v.url).length > 0 ? form.images.map((v) => v.url) : null, images: form.images.map((v) => v.url)?.length > 0 ? form.images.map((v) => v.url) : null,
notes: form.notes.map((v) => v.url).length > 0 ? form.notes.map((v) => v.url) : null, notes: form.notes.map((v) => v.url)?.length > 0 ? form.notes.map((v) => v.url) : null,
others: form.others.map((v) => v.url).length > 0 ? form.others.map((v) => v.url) : null, others: form.others.map((v) => v.url)?.length > 0 ? form.others.map((v) => v.url) : null,
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
ElMessage.success({ ElMessage.success({
......
...@@ -89,8 +89,8 @@ ...@@ -89,8 +89,8 @@
borrower: currentDetail.value?.borrower, borrower: currentDetail.value?.borrower,
oldName: '', oldName: '',
newName: form.newName, newName: form.newName,
oldPhone: [currentDetail.value?.borrower?.phone], oldPhone: JSON.stringify([currentDetail.value?.borrower?.phone]),
newPhone: [], newPhone: JSON.stringify([]),
kinship: form.kinship, kinship: form.kinship,
flowStatus: 'pending', flowStatus: 'pending',
status: 'enable', status: 'enable',
......
...@@ -420,7 +420,7 @@ ...@@ -420,7 +420,7 @@
return ( return (
<> <>
{row.repayStatus {row.repayStatus
? repayStatusOpt.find((v) => v.value === row.repayStatus).label ? repayStatusOpt.find((v) => v.value === row.repayStatus)?.label
: ''} : ''}
</> </>
); );
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<td> <td>
{{ {{
row?.caseStatus row?.caseStatus
? caseStatusOpt.find((v) => v.value === row?.caseStatus).label ? CaseStatus.find((v) => v.value === row?.caseStatus)?.label
: '' : ''
}}</td }}</td
> >
...@@ -156,15 +156,15 @@ ...@@ -156,15 +156,15 @@
<td class="label">跟进结果</td> <td class="label">跟进结果</td>
<td>{{ <td>{{
row?.followStatus row?.followStatus
? followStatusOpt.find((v) => v.value === row?.followStatus).label ? FollowStatus?.find((v) => v.value === row?.followStatus)?.label
: '' : ''
}}</td> }}</td>
<td class="label">跟进状态</td> <td class="label">跟进状态</td>
<td>{{ <td>{{
row?.phoneResultStatus row?.phoneResultStatus
? phoneResultStatusOpt.find( ? PhoneResultStatus.find(
(v) => v.value === row?.phoneResultStatus (v) => v.value === row?.phoneResultStatus
).label )?.label
: '' : ''
}}</td> }}</td>
</tr> </tr>
...@@ -318,7 +318,7 @@ ...@@ -318,7 +318,7 @@
<td> <td>
{{ {{
item?.loan?.caseStatus item?.loan?.caseStatus
? caseStatusOpt.find((v) => v.value === item?.loan?.caseStatus) ? CaseStatus.find((v) => v.value === item?.loan?.caseStatus)
.label .label
: '' : ''
}}</td }}</td
...@@ -330,17 +330,17 @@ ...@@ -330,17 +330,17 @@
<td class="label">跟进结果</td> <td class="label">跟进结果</td>
<td>{{ <td>{{
item?.loan?.followStatus item?.loan?.followStatus
? followStatusOpt.find( ? FollowStatus?.find(
(v) => v.value === item?.loan?.followStatus (v) => v.value === item?.loan?.followStatus
).label )?.label
: '' : ''
}}</td> }}</td>
<td class="label">跟进状态</td> <td class="label">跟进状态</td>
<td>{{ <td>{{
item?.loan?.phoneResultStatus item?.loan?.phoneResultStatus
? phoneResultStatusOpt.find( ? PhoneResultStatus.find(
(v) => v.value === item?.loan?.phoneResultStatus (v) => v.value === item?.loan?.phoneResultStatus
).label )?.label
: '' : ''
}}</td> }}</td>
</tr> </tr>
...@@ -445,7 +445,7 @@ ...@@ -445,7 +445,7 @@
<td> <td>
{{ {{
item?.caseStatus item?.caseStatus
? caseStatusOpt.find((v) => v.value === item?.caseStatus) ? CaseStatus.find((v) => v.value === item?.caseStatus)
.label .label
: '' : ''
}}</td }}</td
...@@ -455,17 +455,17 @@ ...@@ -455,17 +455,17 @@
<td class="label">跟进结果</td> <td class="label">跟进结果</td>
<td>{{ <td>{{
item?.followStatus item?.followStatus
? followStatusOpt.find( ? FollowStatus?.find(
(v) => v.value === item?.followStatus (v) => v.value === item?.followStatus
).label )?.label
: '' : ''
}}</td> }}</td>
<td class="label">跟进状态</td> <td class="label">跟进状态</td>
<td>{{ <td>{{
item?.phoneResultStatus item?.phoneResultStatus
? phoneResultStatusOpt.find( ? PhoneResultStatus.find(
(v) => v.value === item?.phoneResultStatus (v) => v.value === item?.phoneResultStatus
).label )?.label
: '' : ''
}}</td> }}</td>
</tr> </tr>
...@@ -552,7 +552,8 @@ ...@@ -552,7 +552,8 @@
import { Download, Phone } from '@element-plus/icons-vue'; import { Download, Phone } from '@element-plus/icons-vue';
import { saveAudit } from '@/api/audit'; import { saveAudit } from '@/api/audit';
import Decimal from 'decimal.js'; import Decimal from 'decimal.js';
import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, RepayType, FlowStatus, FollowStatus, AuditStatus, CaseStatus } = useDict("PhoneResultStatus","RepayType", "FlowStatus", "FollowStatus","AuditStatus", "CaseStatus");
import { inject } from 'vue'; import { inject } from 'vue';
const envs = getAppEnvConfig(); const envs = getAppEnvConfig();
const selectTab = ref('1'); const selectTab = ref('1');
...@@ -601,20 +602,6 @@ ...@@ -601,20 +602,6 @@
JSON.parse(JSON.stringify(caseDetailConfig.data)) JSON.parse(JSON.stringify(caseDetailConfig.data))
); );
}; };
const options = [
{
value: 'repay',
label: '直接还款',
},
{
value: 'by_stages',
label: '分期还款',
},
{
value: 'settle',
label: '结清减免还款',
},
];
const preview = (item, type) => { const preview = (item, type) => {
const list = []; const list = [];
item[type].forEach((v) => { item[type].forEach((v) => {
...@@ -627,42 +614,6 @@ ...@@ -627,42 +614,6 @@
const name = item.slice(item.lastIndexOf('/') + 1, item.length); const name = item.slice(item.lastIndexOf('/') + 1, item.length);
downloadfile('/sys/static/' + item, {}, name); downloadfile('/sys/static/' + item, {}, name);
}; };
const followStatusOpt = [
{ label: '接通后挂断', value: 'hang_up' },
{ label: '接通有实质进展', value: 'progress' },
{ label: '接通有效转告', value: 'pass_on' },
{ label: '接通拒绝转告', value: 'no_pass' },
{ label: '接听后挂断', value: 'Hang_up_after_answering' },
{ label: '接通无应答', value: 'No_response_when_connected' },
{ label: '称与债人无关', value: 'Claims_unrelated_to_creditors' },
{ label: '称非本人', value: 'Claiming_not_to_be_myself' },
{ label: '无人接听', value: 'no_answer' },
{ label: '关机', value: 'Shutdown' },
{ label: '空号', value: 'dead_number' },
{ label: '占线/忙音/正在通话中', value: 'Busy' },
{ label: '停机', value: 'closing_down' },
{ label: '机器人回复', value: 'Robot_reply' },
{ label: '微信', value: 'WeChat' },
{ label: '短信', value: 'short_message' },
{ label: 'QQ', value: 'QQ' },
{ label: '飞书', value: 'fly' },
{ label: '钉钉', value: 'DING' },
];
const phoneResultStatusOpt = [
{ label: '后续再跟进', value: 'later' },
{ label: '承诺还款', value: 'Promise_Repayment' },
{ label: '暂无还款意愿', value: 'No_Repay' },
{ label: '要求停催', value: 'Stop_Urging' },
{ label: '情绪激动抗拒', value: 'resistance' },
{ label: '拒绝还款', value: 'Refuse_Repayment' },
{ label: '已还款', value: 'Repaired' },
{ label: '代履行还款', value: 'repayment_others' },
];
const caseStatusOpt = [
{ label: '正常', value: 'normal' },
{ label: '撤案', value: 'withdraw' },
{ label: '留案', value: 'stay' },
];
const returnConfig = reactive({ const returnConfig = reactive({
columns: [ columns: [
{ {
...@@ -686,7 +637,7 @@ ...@@ -686,7 +637,7 @@
title: '还款方式', title: '还款方式',
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return <>{row.repayType ? options.find((v) => v.value === row.repayType).label : ''}</>; return <>{row.repayType ? RepayType.value?.find((v) => v.value === row.repayType)?.label : ''}</>;
}, },
}, },
}, },
...@@ -755,7 +706,7 @@ ...@@ -755,7 +706,7 @@
return ( return (
<> <>
{row.followStatus {row.followStatus
? followStatusOpt.find((v) => v.value === row.followStatus).label ? FollowStatus.value?.find((v) => v.value === row.followStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -771,7 +722,7 @@ ...@@ -771,7 +722,7 @@
return ( return (
<> <>
{row.phoneResultStatus {row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label ? PhoneResultStatus.value?.find((v) => v.value === row.phoneResultStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -1146,7 +1097,7 @@ ...@@ -1146,7 +1097,7 @@
document.querySelector(`#${type}`).scrollIntoView(true); document.querySelector(`#${type}`).scrollIntoView(true);
}; };
const foldCaseTree = () => { const foldCaseTree = () => {
if (caseDetailRef.value?.getRowExpandRecords().length === caseDetailConfig.data.length) { if (caseDetailRef.value?.getRowExpandRecords()?.length === caseDetailConfig.data.length) {
caseDetailRef.value?.setAllRowExpand(false); caseDetailRef.value?.setAllRowExpand(false);
} else { } else {
caseDetailRef.value?.setAllRowExpand(true); caseDetailRef.value?.setAllRowExpand(true);
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import { getPlatformPage } from '@/api/platform'; import { getPlatformPage } from '@/api/platform';
import { getManageOrgPage } from '@/api/manageOrg'; import { getManageOrgPage } from '@/api/manageOrg';
import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, AuditStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus","AuditStatus", "CaseStatus");
const router = useRouter(); const router = useRouter();
const onCellClick = (row) => { const onCellClick = (row) => {
router.push({ router.push({
...@@ -37,42 +38,7 @@ ...@@ -37,42 +38,7 @@
query: { id: row.id }, //这里不能直接写成 query: JSON.stringify(item) query: { id: row.id }, //这里不能直接写成 query: JSON.stringify(item)
}); });
}; };
const followStatusOpt = [
{ label: '接通后挂断', value: 'hang_up' },
{ label: '接通有实质进展', value: 'progress' },
{ label: '接通有效转告', value: 'pass_on' },
{ label: '接通拒绝转告', value: 'no_pass' },
{ label: '接听后挂断', value: 'Hang_up_after_answering' },
{ label: '接通无应答', value: 'No_response_when_connected' },
{ label: '称与债人无关', value: 'Claims_unrelated_to_creditors' },
{ label: '称非本人', value: 'Claiming_not_to_be_myself' },
{ label: '无人接听', value: 'no_answer' },
{ label: '关机', value: 'Shutdown' },
{ label: '空号', value: 'dead_number' },
{ label: '占线/忙音/正在通话中', value: 'Busy' },
{ label: '停机', value: 'closing_down' },
{ label: '机器人回复', value: 'Robot_reply' },
{ label: '微信', value: 'WeChat' },
{ label: '短信', value: 'short_message' },
{ label: 'QQ', value: 'QQ' },
{ label: '飞书', value: 'fly' },
{ label: '钉钉', value: 'DING' },
];
const phoneResultStatusOpt = [
{ label: '后续再跟进', value: 'later' },
{ label: '承诺还款', value: 'Promise_Repayment' },
{ label: '暂无还款意愿', value: 'No_Repay' },
{ label: '要求停催', value: 'Stop_Urging' },
{ label: '情绪激动抗拒', value: 'resistance' },
{ label: '拒绝还款', value: 'Refuse_Repayment' },
{ label: '已还款', value: 'Repaired' },
{ label: '代履行还款', value: 'repayment_others' },
];
const caseStatusOpt = [
{ label: '正常', value: 'normal' },
{ label: '撤案', value: 'withdraw' },
{ label: '留案', value: 'stay' },
];
const paramCallback = (param) => { const paramCallback = (param) => {
const obj = JSON.parse(JSON.stringify(param)); const obj = JSON.parse(JSON.stringify(param));
if (obj['cpeDate']) { if (obj['cpeDate']) {
...@@ -236,7 +202,7 @@ ...@@ -236,7 +202,7 @@
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '跟进结果', title: '跟进结果',
width: 80, width: 80,
enum: followStatusOpt, enum: FollowStatus,
search: { el: 'select', props: { filterable: true }, labelWidth: 80 }, search: { el: 'select', props: { filterable: true }, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
...@@ -244,7 +210,7 @@ ...@@ -244,7 +210,7 @@
return ( return (
<> <>
{row.followStatus {row.followStatus
? followStatusOpt.find((v) => v.value === row.followStatus).label ? FollowStatus.value?.find((v) => v.value === row.followStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -256,7 +222,7 @@ ...@@ -256,7 +222,7 @@
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '跟进状态', title: '跟进状态',
width: 80, width: 80,
enum: phoneResultStatusOpt, enum: PhoneResultStatus,
search: { el: 'select', props: { filterable: true }, labelWidth: 80 }, search: { el: 'select', props: { filterable: true }, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
...@@ -264,7 +230,7 @@ ...@@ -264,7 +230,7 @@
return ( return (
<> <>
{row.phoneResultStatus {row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label ? PhoneResultStatus.value?.find((v) => v.value === row.phoneResultStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -276,14 +242,14 @@ ...@@ -276,14 +242,14 @@
title: '案件状态', title: '案件状态',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 80, width: 80,
enum: caseStatusOpt, enum: CaseStatus,
search: { el: 'select', props: { filterable: true }, labelWidth: 80 }, search: { el: 'select', props: { filterable: true }, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.caseStatus ? caseStatusOpt.find((v) => v.value === row.caseStatus).label : ''} {row.caseStatus ? CaseStatus.value?.find((v) => v.value === row.caseStatus)?.label : ''}
</> </>
); );
}, },
......
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
import { getPlatformPage } from '@/api/platform'; import { getPlatformPage } from '@/api/platform';
import { getManageOrgPage } from '@/api/manageOrg'; import { getManageOrgPage } from '@/api/manageOrg';
import { getTenantPage } from '@/api/tenant'; import { getTenantPage } from '@/api/tenant';
import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, DistributeStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus","DistributeStatus", "CaseStatus");
const caseLRef = ref(); const caseLRef = ref();
const selectdList = ref([]); const selectdList = ref([]);
const curParam = ref({}); const curParam = ref({});
...@@ -104,11 +106,6 @@ ...@@ -104,11 +106,6 @@
// getStatisis(obj); // getStatisis(obj);
return obj; return obj;
}; };
const caseStatusOpt = [
{ label: '正常', value: 'normal' },
{ label: '撤案', value: 'withdraw' },
{ label: '留案', value: 'stay' },
];
const backCase = async () => { const backCase = async () => {
// 勾选的情况 // 勾选的情况
// if (selectdList.value && selectdList.value.length) { // if (selectdList.value && selectdList.value.length) {
...@@ -130,11 +127,6 @@ ...@@ -130,11 +127,6 @@
// } // }
showModal.value = true; showModal.value = true;
}; };
const distributeStatusOpt = [
{ label: '未分派', value: 'undistributed' },
{ label: '分派到调解中心', value: 'tenant' },
{ label: '分派到CPE', value: 'CPE' },
];
const onCheckboxAll = (flag) => { const onCheckboxAll = (flag) => {
if (flag.checked) { if (flag.checked) {
selectdList.value = flag.records; selectdList.value = flag.records;
...@@ -218,7 +210,7 @@ ...@@ -218,7 +210,7 @@
title: '分派状态', title: '分派状态',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 80, width: 80,
enum: distributeStatusOpt, enum: DistributeStatus,
search: { el: 'select', props: { filterable: true }, labelWidth: 78 }, search: { el: 'select', props: { filterable: true }, labelWidth: 78 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
...@@ -226,7 +218,7 @@ ...@@ -226,7 +218,7 @@
return ( return (
<> <>
{row.distributeStatus {row.distributeStatus
? distributeStatusOpt.find((v) => v.value === row.distributeStatus).label ? DistributeStatus.value?.find((v) => v.value === row.distributeStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -335,14 +327,14 @@ ...@@ -335,14 +327,14 @@
title: '案件状态', title: '案件状态',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 80, width: 80,
enum: caseStatusOpt, enum: CaseStatus,
// search: { el: 'select', props: { filterable: true }, labelWidth: 80 }, // search: { el: 'select', props: { filterable: true }, labelWidth: 80 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.caseStatus ? caseStatusOpt.find((v) => v.value === row.caseStatus).label : ''} {row.caseStatus ? CaseStatus.value?.find((v) => v.value === row.caseStatus)?.label : ''}
</> </>
); );
}, },
......
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
return ( return (
<> <>
{row.followStatus {row.followStatus
? followStatusOpt.find((v) => v.value === row.followStatus).label ? followStatusOpt.find((v) => v.value === row.followStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
return ( return (
<> <>
{row.phoneResultStatus {row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label ? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.caseStatus ? caseStatusOpt.find((v) => v.value === row.caseStatus).label : ''} {row.caseStatus ? caseStatusOpt.find((v) => v.value === row.caseStatus)?.label : ''}
</> </>
); );
}, },
......
...@@ -56,19 +56,14 @@ ...@@ -56,19 +56,14 @@
const downloadfile = inject('download'); const downloadfile = inject('download');
const router = useRouter(); const router = useRouter();
const envs = getAppEnvConfig(); const envs = getAppEnvConfig();
import { useDict } from '@/hooks/useDict';
const { PhoneResultStatus, ReduceType, FlowStatus, FollowStatus, AuditStatus, CaseStatus } = useDict("PhoneResultStatus","ReduceType", "FlowStatus", "FollowStatus","AuditStatus", "CaseStatus");
const onCellClick = (row) => { const onCellClick = (row) => {
router.push({ router.push({
path: '/property/case-detail', path: '/property/case-detail',
query: { id: row.id }, //这里不能直接写成 query: JSON.stringify(item) query: { id: row.id }, //这里不能直接写成 query: JSON.stringify(item)
}); });
}; };
const flowStatusOpt = [
{ label: '待审核', value: 'pending' },
// { label: '审核中', value: 'in_review' },
{ label: '通过', value: 'pass' },
{ label: '未通过', value: 'fail' },
];
const upload = reactive({ const upload = reactive({
// 是否禁用上传 // 是否禁用上传
isUploading: false, isUploading: false,
...@@ -252,14 +247,14 @@ ...@@ -252,14 +247,14 @@
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '审核状态', title: '审核状态',
width: 95, width: 95,
enum: flowStatusOpt, enum: FlowStatus,
search: { el: 'select', props: { filterable: true }, labelWidth: 95 }, search: { el: 'select', props: { filterable: true }, labelWidth: 95 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.flowStatus ? flowStatusOpt.find((v) => v.value === row.flowStatus).label : ''} {row.flowStatus ? FlowStatus.value?.find((v) => v.value === row.flowStatus)?.label : ''}
</> </>
); );
}, },
......
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
return ( return (
<> <>
{row.followStatus {row.followStatus
? followStatusOpt.find((v) => v.value === row.followStatus).label ? followStatusOpt.find((v) => v.value === row.followStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
return ( return (
<> <>
{row.phoneResultStatus {row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label ? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
return ( return (
<> <>
{row.auditStatus {row.auditStatus
? auditStatusOpt.find((v) => v.value === row.auditStatus).label ? auditStatusOpt.find((v) => v.value === row.auditStatus)?.label
: ''} : ''}
</> </>
); );
......
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
return ( return (
<> <>
{row.followStatus {row.followStatus
? followStatusOpt.find((v) => v.value === row.followStatus).label ? followStatusOpt.find((v) => v.value === row.followStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
return ( return (
<> <>
{row.phoneResultStatus {row.phoneResultStatus
? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus).label ? phoneResultStatusOpt.find((v) => v.value === row.phoneResultStatus)?.label
: ''} : ''}
</> </>
); );
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.caseStatus ? caseStatusOpt.find((v) => v.value === row.caseStatus).label : ''} {row.caseStatus ? caseStatusOpt.find((v) => v.value === row.caseStatus)?.label : ''}
</> </>
); );
}, },
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
return ( return (
<> <>
{row.messageType {row.messageType
? messageTypeOpt.find((v) => v.value === row.messageType).label ? messageTypeOpt.find((v) => v.value === row.messageType)?.label
: ''} : ''}
</> </>
); );
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<>{row.sendType ? sendTypeOpt.find((v) => v.value === row.sendType).label : ''}</> <>{row.sendType ? sendTypeOpt.find((v) => v.value === row.sendType)?.label : ''}</>
); );
}, },
}, },
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
return ( return (
<> <>
{row.serviceType {row.serviceType
? serviceTypeOpt.find((v) => v.value === row.serviceType).label ? serviceTypeOpt.find((v) => v.value === row.serviceType)?.label
: ''} : ''}
</> </>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment