This commit is contained in:
cxc
2022-12-05 15:58:30 +08:00
parent a7a8f21d11
commit 51c464985a
32 changed files with 289 additions and 1112 deletions

View File

@ -5,6 +5,9 @@ import md5 from "js-md5";
import { companyList } from "@/api/dataList/enterprise";
import { expertList } from "@/api/expert/expert";
import { listCasDemand } from "../../api/dataApproval/enterpriseServiceDemand";
import { expertAchievementList } from "../../api/dataApproval/achivement";
import { businessList } from "../../api/Businessneeds";
import { enterpriseProductApprovalList } from "../../api/dataApproval/enterpriseProduct";
const useUserStore = defineStore("user", {
state: () => ({
@ -13,8 +16,12 @@ const useUserStore = defineStore("user", {
avatar: "",
roles: [],
permissions: [],
unApprovedBusiness: 10,
unApprovedExpert: 20,
unApprovedBusiness: 0,
unApprovedExpert: 0,
unApprovedAchivement: 0,
unApprovedTechnology: 0,
unApprovedService: 0,
unApprovedProduct: 0,
serviceDemandTotal: 0,
}),
actions: {
@ -66,25 +73,63 @@ const useUserStore = defineStore("user", {
},
async getApprovalCount() {
const resps = await Promise.all([
companyList({
examineStatus: 0,
pageSize: 1,
pageNum: 10,
}),
expertList({
examineStatus: 0,
pageSize: 1,
pageNum: 10,
}),
listCasDemand(),
]);
this.unApprovedBusiness = resps[0].total;
this.unApprovedExpert = resps[1].total;
this.serviceDemandTotal = resps[2].total;
this.getUnApprovedBusiness();
this.getUnApprovedExpert();
this.getUnApprovedAchivement();
this.getUnApprovedTechnology();
this.getUnApprovedService();
this.getUnApprovedProduct();
this.getServiceDemandTotal();
},
unApprovedBusinessPlus() {
this.unApprovedBusiness++;
async getUnApprovedBusiness() {
const resp = await companyList({
examineStatus: 0,
pageSize: 1,
pageNum: 10,
});
this.unApprovedBusiness = resp.total;
},
async getUnApprovedExpert() {
const resp = await expertList({
examineStatus: 0,
pageSize: 1,
pageNum: 10,
});
this.unApprovedExpert = resp.total;
},
async getUnApprovedAchivement() {
const resp = await expertAchievementList({
status: 0,
pageNum: 1,
pageSize: 10,
});
this.unApprovedAchivement = resp.total;
},
async getUnApprovedTechnology() {
const resp = await businessList({ status: 0, pageNum: 1, pageSize: 10 });
this.unApprovedTechnology = resp.total;
},
async getUnApprovedService() {
const resp = await listCasDemand({
pageNum: 1,
pageSize: 10,
status: 0,
});
this.unApprovedService = resp.total;
},
async getUnApprovedProduct() {
const resp = await enterpriseProductApprovalList({
pageNum: 1,
pageSize: 10,
status: 0,
});
this.unApprovedProduct = resp.total;
},
async getServiceDemandTotal() {
const resp = await listCasDemand();
this.serviceDemandTotal = resp.total;
},
// 退出系统
logOut() {