自动审核数量提示

This commit is contained in:
cxc
2022-12-07 11:24:31 +08:00
parent 698e012ef3
commit e6dfe8008a
7 changed files with 72 additions and 27 deletions

View File

@ -8,6 +8,10 @@ import { listCasDemand } from "../../api/dataApproval/enterpriseServiceDemand";
import { expertAchievementList } from "../../api/dataApproval/achivement";
import { businessList } from "../../api/Businessneeds";
import { enterpriseProductApprovalList } from "../../api/dataApproval/enterpriseProduct";
import {
getUnApprovalCount,
resetUnApprovalCount,
} from "../../api/dataApproval/count";
const useUserStore = defineStore("user", {
state: () => ({
@ -88,6 +92,11 @@ const useUserStore = defineStore("user", {
this.getTechnologyTotal();
},
async resetUnApproval(name, field) {
await resetUnApprovalCount(name);
this[field] = 0;
},
async getUnApprovedBusiness() {
const resp = await companyList({
examineStatus: 0,
@ -105,32 +114,20 @@ const useUserStore = defineStore("user", {
this.unApprovedExpert = resp.total;
},
async getUnApprovedAchivement() {
const resp = await expertAchievementList({
status: 0,
pageNum: 1,
pageSize: 10,
});
this.unApprovedAchivement = resp.total;
const resp = await getUnApprovalCount("achievement");
this.unApprovedAchivement = resp.data ?? 0;
},
async getUnApprovedTechnology() {
const resp = await businessList({ status: 0, pageNum: 1, pageSize: 10 });
this.unApprovedTechnology = resp.total;
const resp = await getUnApprovalCount("technology");
this.unApprovedTechnology = resp.data ?? 0;
},
async getUnApprovedService() {
const resp = await listCasDemand({
pageNum: 1,
pageSize: 10,
status: 0,
});
this.unApprovedService = resp.total;
const resp = await getUnApprovalCount("service");
this.unApprovedService = resp.data ?? 0;
},
async getUnApprovedProduct() {
const resp = await enterpriseProductApprovalList({
pageNum: 1,
pageSize: 10,
status: 0,
});
this.unApprovedProduct = resp.total;
const resp = await getUnApprovalCount("product");
this.unApprovedProduct = resp.data ?? 0;
},
async getServiceDemandTotal() {