产品数量等

V0.1
yujialong 10 months ago
parent b2d946f992
commit 57c828a8a7
  1. 2
      .env.production
  2. 1
      src/api/bank.ts
  3. 1
      src/api/judgment.ts
  4. 1
      src/components/Panel/index.vue
  5. 111
      src/layout/components/AppSidebar/Menu.vue
  6. 2
      src/utils/request.ts
  7. 4
      src/views/product/insurance/Add.vue
  8. 9
      src/views/product/strategy/150.vue

@ -1 +1 @@
VITE_BASE_API=http://121.37.12.51
VITE_BASE_API=https://www.occupationlab.com

@ -21,3 +21,4 @@ export const update = async (data: Record<string, any>): Promise<any> => (await
export const cancelCollection = async (id: number): Promise<any> => (await axios.post(`/product/checkPointCollect/cancelCollection?favoriteId=${id}`)).data;
export const collect = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/checkPointCollect/collect`, data)).data;
export const submitOpe = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/product/bank/operation/submit`, data)).data;
export const statistics = async (data: Record<string, any>): Promise<any> => (await axios.post(`/product/product/bank/products/statistics`, data)).data;

@ -13,3 +13,4 @@ export const deleteCache = async (data: Record<string, any>): Promise<any> =>
`/product/product/bank/operation/deleteCache?projectId=${data.projectId}&checkpoint=${data.checkpointId}&assessmentId=${data.assessmentId}&competitionId=${data.competitionId}`,
)
).data;
export const getOperation = async (params?: Record<string, any>): Promise<any> => (await axios.get('/product/product/bank/operation/getOperation', { params })).data;

@ -540,6 +540,7 @@ const submit = async () => {
reportId.value = retMap.reportId;
Cookies.set('sand-reportId', retMap.reportId);
localStorage.setItem('sand-taskList', JSON.stringify(taskList.value));
await deleteCache(getIds());
submiting.value = false;
//

@ -2,39 +2,45 @@
<ul class="switch px-7">
<!-- 产品经理 -->
<template v-if="role == 41">
<li :class="{ active: active == 1 }"
@click="toPage('/product/bank?type=0&i=1&role=41')">
<img class="icon"
src="@/assets/images/icon5.png"
alt="" />
<img class="icon-1"
src="@/assets/images/icon5-1.png"
alt="" />
<p class="text">个人产品</p>
</li>
<li :class="{ active: active == 2 }"
@click="toPage('/product/bank?type=1&i=2&role=41')">
<img class="icon"
src="@/assets/images/icon6.png"
alt="" />
<img class="icon-1"
src="@/assets/images/icon6-1.png"
alt="" />
<p class="text">企业产品</p>
</li>
<el-badge :value="num1">
<li :class="{ active: active == 1 }"
@click="toPage('/product/bank?type=0&i=1&role=41')">
<img class="icon"
src="@/assets/images/icon5.png"
alt="" />
<img class="icon-1"
src="@/assets/images/icon5-1.png"
alt="" />
<p class="text">个人产品</p>
</li>
</el-badge>
<el-badge :value="num2">
<li :class="{ active: active == 2 }"
@click="toPage('/product/bank?type=1&i=2&role=41')">
<img class="icon"
src="@/assets/images/icon6.png"
alt="" />
<img class="icon-1"
src="@/assets/images/icon6-1.png"
alt="" />
<p class="text">企业产品</p>
</li>
</el-badge>
</template>
<!-- 风控经理 -->
<template v-else-if="role == 42">
<li :class="{ active: active == 1 }"
@click="toPage('/product/bank?type=&i=1&role=42')">
<img class="icon"
src="@/assets/images/icon1.png"
alt="" />
<img class="icon-1"
src="@/assets/images/icon1-1.png"
alt="" />
<p class="text">产品风控配置</p>
</li>
<el-badge :value="num1">
<li :class="{ active: active == 1 }"
@click="toPage('/product/bank?type=&i=1&role=42')">
<img class="icon"
src="@/assets/images/icon1.png"
alt="" />
<img class="icon-1"
src="@/assets/images/icon1-1.png"
alt="" />
<p class="text">产品风控配置</p>
</li>
</el-badge>
<li :class="{ active: active == 2 }"
@click="toPage('/product/strategy?i=2&role=42&id=150')">
<img class="icon"
@ -67,13 +73,15 @@
</li>
</template>
<!-- 专家委员会 -->
<li v-else-if="role == 43"
class="active">
<img class="icon-1"
src="@/assets/images/icon7-1.png"
alt="" />
<p class="text">审批产品</p>
</li>
<el-badge v-else-if="role == 43"
:value="num1">
<li class="active">
<img class="icon-1"
src="@/assets/images/icon7-1.png"
alt="" />
<p class="text">审批产品</p>
</li>
</el-badge>
<!-- 保险 -->
<li v-else-if="route.path.includes('insurance')"
class="active">
@ -119,20 +127,47 @@
</template>
<script setup lang="ts">
import { computed, ref } from 'vue';
import { onMounted, computed, ref } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import Cookies from 'js-cookie';
import { statistics } from '@/api/bank';
const router = useRouter();
const route = useRoute();
const active = computed(() => route.query.i);
const role = computed(() => route.query.role);
const projectId = +Cookies.get('sand-projectId');
const levelId = +Cookies.get('sand-level');
const isAdmin = ref<number | string>(route.query.admin ?? Cookies.get('sand-admin')); //
const num1 = ref<number>(0);
const num2 = ref<number>(0);
//
const toPage = (path: string) => {
router.push(path);
};
//
const getNum = async (status?: number, type?: number) => {
const { data } = await statistics({
checkPointId: levelId,
projectId,
status,
productType: type,
});
if (type === 1) {
// -
num2.value = data;
} else {
num1.value = data;
}
};
onMounted(() => {
const status = role.value === '41' ? 5 : role.value === '42' ? 1 : role.value === '43' ? 2 : ''; // (1- 2-3-4-5-
if (status) {
getNum(status, role.value === '41' ? 0 : '');
role.value === '41' && getNum(status, 1);
}
});
</script>
<style lang="scss" scoped>

@ -25,7 +25,7 @@ service.interceptors.response.use(
if (status === 200) {
return res;
}
ElMessage.error(message);
message === '无缓存' || ElMessage.error(message);
} else {
return res;
}

@ -249,10 +249,10 @@ const submit = async () => {
param.applicationMaterial = param.applicationMaterial.join();
param.exemptionFromLiability = param.exemptionFromLiability.join();
const res = await addInsuranceProducts(param);
// router.push(`/product/insurance/detail?id=` + res.message);
router.push(`/product/insurance/detail?id=` + res.message);
addRecord(param);
ElMessage.success('提交成功!');
emit('getList', 1);
emit('getList');
} finally {
}
};

@ -133,7 +133,7 @@
import { ref, computed, watch, onMounted } from 'vue';
import { ElMessage } from 'element-plus';
import { accessStrategyGovernmentBlacklistFind, accessStrategyGovernmentBlacklistSave } from '@/api/model';
import { getProcessInformationBasedOnRoles, addOperation } from '@/api/judgment';
import { getProcessInformationBasedOnRoles, addOperation, getOperation } from '@/api/judgment';
import type { TableColumnCtx } from 'element-plus';
import { useRouter, useRoute } from 'vue-router';
import { handleId, getIds } from '@/utils/common';
@ -210,6 +210,13 @@ const getConfig = async () => {
//
const getDetail = async () => {
try {
// const res = await getOperation({
// ...getIds(),
// checkpoint: levelId,
// parentId: '1,2,42,67,147,150',
// });
// cache.value = !!res.judgmentRuleReqs; //
const { data } = await accessStrategyGovernmentBlacklistFind(levelId, projectId);
info.value = data;
getConfig();

Loading…
Cancel
Save