产品数量等

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 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 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 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}`, `/product/product/bank/operation/deleteCache?projectId=${data.projectId}&checkpoint=${data.checkpointId}&assessmentId=${data.assessmentId}&competitionId=${data.competitionId}`,
) )
).data; ).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; reportId.value = retMap.reportId;
Cookies.set('sand-reportId', retMap.reportId); Cookies.set('sand-reportId', retMap.reportId);
localStorage.setItem('sand-taskList', JSON.stringify(taskList.value)); localStorage.setItem('sand-taskList', JSON.stringify(taskList.value));
await deleteCache(getIds());
submiting.value = false; submiting.value = false;
// //

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

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

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

@ -133,7 +133,7 @@
import { ref, computed, watch, onMounted } from 'vue'; import { ref, computed, watch, onMounted } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
import { accessStrategyGovernmentBlacklistFind, accessStrategyGovernmentBlacklistSave } from '@/api/model'; 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 type { TableColumnCtx } from 'element-plus';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { handleId, getIds } from '@/utils/common'; import { handleId, getIds } from '@/utils/common';
@ -210,6 +210,13 @@ const getConfig = async () => {
// //
const getDetail = async () => { const getDetail = async () => {
try { 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); const { data } = await accessStrategyGovernmentBlacklistFind(levelId, projectId);
info.value = data; info.value = data;
getConfig(); getConfig();

Loading…
Cancel
Save