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> <p class="text">产品风控配置</p>
</li> </li>
<li :class="{ active: active == 2 }" <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" <img class="icon"
src="@/assets/images/icon2.png" src="@/assets/images/icon2.png"
alt="" /> alt="" />

@ -33,3 +33,9 @@ router.afterEach((to: RouteLocationNormalized) => {
// finish progress bar // finish progress bar
NProgress.done(); 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: [ children: [
{ path: 'index', component: () => import('@/views/product/List.vue'), meta: { title: '产品列表' } }, { path: 'index', component: () => import('@/views/product/List.vue'), meta: { title: '产品列表' } },
{ path: 'bank/:action', component: () => import('@/views/product/bank/CardList.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> </ul>
</div> </div>
<div class="right flex-1 px-5 pt-2"> <div class="right flex-1 px-5 pt-2">
<component :is="defineAsyncComponent({loader: () => import('./' + action + '.vue')})" <!-- <component :is="currentSubApp"
@getList="getList"></component> @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>
</div> </div>
</template> </template>
@ -52,10 +59,17 @@ import { Plus } from '@element-plus/icons-vue';
import { bankingProductsList, batchDeletion } from '@/api/bank'; import { bankingProductsList, batchDeletion } from '@/api/bank';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { getStatus } from '@/store/useProduct'; 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 router = useRouter();
const route = useRoute(); const route = useRoute();
const action = ref<any>(''); 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 list = ref<Array<any>>([]);
const loading = ref<boolean>(false); const loading = ref<boolean>(false);
const productType = computed(() => route.query.type); // / const productType = computed(() => route.query.type); // /

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

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

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

Loading…
Cancel
Save