yujialong 1 year ago
parent 659da1c8dc
commit 46a84cd266
  1. 2
      src/layout/components/AppSidebar/Menu.vue
  2. 6
      src/permission.ts
  3. 2
      src/router/index.ts
  4. 18
      src/views/product/bank/CardList.vue
  5. 17
      src/views/product/strategy/150.vue
  6. 12
      src/views/product/strategy/151.vue
  7. 23
      src/views/product/strategy/CardList.vue

@ -34,7 +34,7 @@
<p class="text">产品风控配置</p>
</li>
<li :class="{ active: active == 2 }"
@click="toPage('/product/strategy/config?type=&i=2&role=42')">
@click="toPage('/product/strategy?type=&i=2&role=42')">
<img class="icon"
src="@/assets/images/icon2.png"
alt="" />

@ -33,3 +33,9 @@ router.afterEach((to: RouteLocationNormalized) => {
// finish progress bar
NProgress.done();
});
router.onError((error, to) => {
if (error.message.includes('Failed to fetch dynamically imported module')) {
window.location = to.fullPath;
}
});

@ -30,7 +30,7 @@ export const routes: Array<RouteRecordRaw> = [
children: [
{ path: 'index', component: () => import('@/views/product/List.vue'), meta: { title: '产品列表' } },
{ path: 'bank/:action', component: () => import('@/views/product/bank/CardList.vue'), meta: { title: '产品列表' } },
{ path: 'strategy/:action', component: () => import('@/views/product/strategy/CardList.vue'), meta: { title: '产品列表' } },
{ path: 'strategy', component: () => import('@/views/product/strategy/CardList.vue'), meta: { title: '产品列表' } },
],
},
{

@ -39,8 +39,15 @@
</ul>
</div>
<div class="right flex-1 px-5 pt-2">
<component :is="defineAsyncComponent({loader: () => import('./' + action + '.vue')})"
@getList="getList"></component>
<!-- <component :is="currentSubApp"
@getList="getList"></component> -->
<config v-if="action === 'config'"
@getList="getList"></config>
<detail v-if="action === 'detail'"></detail>
<add v-else-if="action === 'add'"
@getList="getList"></add>
<approve v-else-if="action === 'approve'"
@getList="getList"></approve>
</div>
</div>
</template>
@ -52,10 +59,17 @@ import { Plus } from '@element-plus/icons-vue';
import { bankingProductsList, batchDeletion } from '@/api/bank';
import { useRouter, useRoute } from 'vue-router';
import { getStatus } from '@/store/useProduct';
import Config from './Config.vue';
import Detail from './Detail.vue';
import Add from './Add.vue';
import Approve from './Approve.vue';
const router = useRouter();
const route = useRoute();
const action = ref<any>('');
// const modules: any = import.meta.glob('./*.vue');
// let currentSubApp = defineAsyncComponent(modules[`./${route.params.action}.vue`]);
const list = ref<Array<any>>([]);
const loading = ref<boolean>(false);
const productType = computed(() => route.query.type); // /

@ -126,7 +126,6 @@ const router = useRouter();
const route = useRoute();
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const id = computed(() => +route.query.id);
const form = ref<Record<string, any>[]>([]);
const info = ref<Record<string, any>[]>([]);
const height = window.innerHeight - 270;
@ -167,8 +166,8 @@ const getConfig = async () => {
otherFamilyMembersHitRejected: !!cur?.otherFamilyMembersHitRejected,
parentsHitRejected: !!cur?.parentsHitRejected,
personalHitBlacklist: !!cur?.personalHitBlacklist,
symbol: isRule(e.id) ? symbol[0] : '>=',
had: e.id === 167 && had.length ? had[0] : '',
symbol: isRule(e.id) && symbol?.length ? symbol[0] : '>=',
had: e.id === 167 && had?.length ? had[0] : '',
num: isRule(e.id) && num?.length ? num[0] : '',
ruleOne: '',
ruleTwo: '',
@ -192,13 +191,11 @@ const getConfig = async () => {
};
//
const getDetail = async () => {
if (id.value) {
try {
const { data } = await accessStrategyGovernmentBlacklistFind(levelId, projectId);
info.value = data;
getConfig();
} finally {
}
try {
const { data } = await accessStrategyGovernmentBlacklistFind(levelId, projectId);
info.value = data;
getConfig();
} finally {
}
};

@ -158,13 +158,11 @@ const getConfig = async () => {
};
//
const getDetail = async () => {
if (id.value) {
try {
const { data } = await accessStrategyGovernmentBlacklistFind(levelId, projectId);
info.value = data;
getConfig();
} finally {
}
try {
const { data } = await accessStrategyGovernmentBlacklistFind(levelId, projectId);
info.value = data;
getConfig();
} finally {
}
};

@ -18,8 +18,8 @@
</ul>
</div>
<div class="right flex-1 px-5 pt-2">
<component v-if="id"
:is="defineAsyncComponent(() => import('./' + id + '.vue'))"></component>
<Com1 v-if="id == 150" />
<Com2 v-else-if="id == 151" />
</div>
</div>
</el-tab-pane>
@ -36,15 +36,13 @@ import { computed, onMounted, ref, watch, defineAsyncComponent } from 'vue';
import type { TabsPaneContext } from 'element-plus';
import { getProcessInformationBasedOnRoles } from '@/api/judgment';
import { useRouter, useRoute } from 'vue-router';
import Com1 from './150.vue';
import Com2 from './151.vue';
const router = useRouter();
const route = useRoute();
const curTab = ref<string>('tab1');
const action = ref<any>('');
const list = ref<Array<any>>([]);
const loading = ref<boolean>(false);
const productType = computed(() => route.query.type); // /
const role = computed(() => +route.query.role || 41);
const id = computed(() => +route.query.id);
//
@ -52,7 +50,7 @@ const getList = async () => {
const { process } = await getProcessInformationBasedOnRoles(67);
id.value ||
router.push({
path: `/product/strategy/config`,
path: `/product/strategy`,
query: {
...route.query,
id: process[0].recordChildren[0].id,
@ -64,19 +62,10 @@ onMounted(() => {
getList();
});
watch(
route,
(route: any) => {
action.value = route.params.action;
},
{
immediate: true,
},
);
//
const switchProduct = (id: number) => {
router.push({
path: `/product/strategy/config`,
path: `/product/strategy`,
query: {
...route.query,
id,

Loading…
Cancel
Save