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

案件id可点击

parent 588ea991
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
import { ElMessageBox, ElMessage, ElButton } from 'element-plus'; import { ElMessageBox, ElMessage, ElButton } from 'element-plus';
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 { useRouter } from 'vue-router';
import { useDict } from '@/hooks/useDict'; import { useDict } from '@/hooks/useDict';
import { getAppEnvConfig } from '@/utils/env'; import { getAppEnvConfig } from '@/utils/env';
import { useAuthStore } from '@/stores/modules/auth'; import { useAuthStore } from '@/stores/modules/auth';
...@@ -74,6 +75,7 @@ ...@@ -74,6 +75,7 @@
const downloadfile = inject('download'); const downloadfile = inject('download');
const activeName = ref('pending'); const activeName = ref('pending');
const tabs = ref([]); const tabs = ref([]);
const router = useRouter();
const ProTableRef = ref(); const ProTableRef = ref();
const showModal = ref(false); const showModal = ref(false);
...@@ -195,6 +197,12 @@ ...@@ -195,6 +197,12 @@
RefImage.value = true; RefImage.value = true;
srcList.value = list; srcList.value = list;
}; };
const onCellClick = (row) => {
router.push({
path: '/property/case-detail',
query: { id: row.id }, //这里不能直接写成 query: JSON.stringify(item)
});
};
const config = computed(() => { const config = computed(() => {
return { return {
columns: [ columns: [
...@@ -207,7 +215,8 @@ ...@@ -207,7 +215,8 @@
search: { el: 'input', labelWidth: 90 }, search: { el: 'input', labelWidth: 90 },
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return <>{Array.from(new Set(row.loans.map((v) => v.caseId))).join(',')}</>; return <>{Array.from(new Set(row.loans.map((v, iiii) => <><span onClick={() => onCellClick(v)}
className="text-blue-400 cursor-pointer">{v.caseId}</span><span>{iiii === row.loans.length - 1 ? '':','}</span></>)))}</>;
}, },
}, },
width: 80, width: 80,
......
...@@ -59,6 +59,9 @@ ...@@ -59,6 +59,9 @@
import { Download } from '@element-plus/icons-vue'; import { Download } from '@element-plus/icons-vue';
import { getAppEnvConfig } from '@/utils/env'; import { getAppEnvConfig } from '@/utils/env';
import { useAuthStore } from '@/stores/modules/auth'; import { useAuthStore } from '@/stores/modules/auth';
import { useRouter } from 'vue-router';
const router = useRouter();
const envs = getAppEnvConfig(); const envs = getAppEnvConfig();
const reduceDrawerRef = ref(); const reduceDrawerRef = ref();
const { authButtonListGet } = useAuthStore(); // 获取用户权限列表 const { authButtonListGet } = useAuthStore(); // 获取用户权限列表
...@@ -163,6 +166,12 @@ ...@@ -163,6 +166,12 @@
query(); query();
}; };
const onCellClick = (row) => {
router.push({
path: '/property/case-detail',
query: { id: row.id }, //这里不能直接写成 query: JSON.stringify(item)
});
};
const config = computed(() => { const config = computed(() => {
return { return {
columns: [ columns: [
...@@ -175,9 +184,8 @@ ...@@ -175,9 +184,8 @@
search: { el: 'input', labelWidth: 90 }, search: { el: 'input', labelWidth: 90 },
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return <>{Array.from(new Set(row.reduceRecords.map((v, iiii) => <><span onClick={() => onCellClick(v.loan)}
<>{Array.from(new Set(row.reduceRecords.map((v) => v.loan.caseId))).join(',')}</> className="text-blue-400 cursor-pointer">{v.loan.caseId}</span><span>{iiii === row.reduceRecords.length - 1 ? '':','}</span></>)))}</>;
);
}, },
}, },
width: 120, width: 120,
......
...@@ -58,6 +58,8 @@ ...@@ -58,6 +58,8 @@
import { useAuthStore } from '@/stores/modules/auth'; import { useAuthStore } from '@/stores/modules/auth';
const { authButtonListGet } = useAuthStore(); // 获取用户权限列表 const { authButtonListGet } = useAuthStore(); // 获取用户权限列表
const returnModalRef = ref(); const returnModalRef = ref();
import { useRouter } from 'vue-router';
const router = useRouter();
const { RepayType, FlowStatus } = useDict('RepayType', 'FlowStatus'); const { RepayType, FlowStatus } = useDict('RepayType', 'FlowStatus');
const ProTableRef = ref(); const ProTableRef = ref();
...@@ -77,6 +79,12 @@ ...@@ -77,6 +79,12 @@
selectdList.value = []; selectdList.value = [];
} }
}; };
const onCellClick = (row) => {
router.push({
path: '/property/case-detail',
query: { id: row.id }, //这里不能直接写成 query: JSON.stringify(item)
});
};
const handleClick = () => { const handleClick = () => {
setTimeout(() => { setTimeout(() => {
query(); query();
...@@ -171,17 +179,14 @@ ...@@ -171,17 +179,14 @@
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
if (row.reduce && row.reduce.reduceRecords) { if (row.reduce && row.reduce.reduceRecords) {
return ( return <>{Array.from(new Set(row.reduce.reduceRecords.map((v, iiii) => <><span onClick={() => onCellClick(v.loan)}
<> className="text-blue-400 cursor-pointer">{v.loan.caseId}</span><span>{iiii === row.reduce.reduceRecords.length - 1 ? '':','}</span></>)))}</>;
{Array.from(new Set(row.reduce.reduceRecords.map((v) => v.loan.caseId))).join(
','
)}
</>
);
} else if (row.stages && row.stages.loans) { } else if (row.stages && row.stages.loans) {
return <>{Array.from(new Set(row.stages.loans.map((v) => v.caseId))).join(',')}</>; return <>{Array.from(new Set(row.stages.loans.map((v, iiii) => <><span onClick={() => onCellClick(v)}
className="text-blue-400 cursor-pointer">{v.caseId}</span><span>{iiii === row.stages.loans.length - 1 ? '':','}</span></>)))}</>;
} else { } else {
return <>{row.loan?.caseId}</>; return <><span onClick={() => onCellClick(row.loan)}
className="text-blue-400 cursor-pointer">{row.loan?.caseId}</span></>;
} }
}, },
}, },
......
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