自动审核数量提示
This commit is contained in:
22
src/api/dataApproval/count.js
Normal file
22
src/api/dataApproval/count.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
// 获取未审核数量
|
||||||
|
export const getUnApprovalCount = (name) =>
|
||||||
|
request({
|
||||||
|
url: "/app/map/handleReadCount",
|
||||||
|
method: "get",
|
||||||
|
params: {
|
||||||
|
name,
|
||||||
|
type: "1",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// 重置未审核
|
||||||
|
export const resetUnApprovalCount = (name) =>
|
||||||
|
request({
|
||||||
|
url: "/app/map/handleReadCount",
|
||||||
|
method: "get",
|
||||||
|
params: {
|
||||||
|
name,
|
||||||
|
type: "3",
|
||||||
|
},
|
||||||
|
});
|
||||||
@ -8,6 +8,10 @@ import { listCasDemand } from "../../api/dataApproval/enterpriseServiceDemand";
|
|||||||
import { expertAchievementList } from "../../api/dataApproval/achivement";
|
import { expertAchievementList } from "../../api/dataApproval/achivement";
|
||||||
import { businessList } from "../../api/Businessneeds";
|
import { businessList } from "../../api/Businessneeds";
|
||||||
import { enterpriseProductApprovalList } from "../../api/dataApproval/enterpriseProduct";
|
import { enterpriseProductApprovalList } from "../../api/dataApproval/enterpriseProduct";
|
||||||
|
import {
|
||||||
|
getUnApprovalCount,
|
||||||
|
resetUnApprovalCount,
|
||||||
|
} from "../../api/dataApproval/count";
|
||||||
|
|
||||||
const useUserStore = defineStore("user", {
|
const useUserStore = defineStore("user", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
@ -88,6 +92,11 @@ const useUserStore = defineStore("user", {
|
|||||||
this.getTechnologyTotal();
|
this.getTechnologyTotal();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async resetUnApproval(name, field) {
|
||||||
|
await resetUnApprovalCount(name);
|
||||||
|
this[field] = 0;
|
||||||
|
},
|
||||||
|
|
||||||
async getUnApprovedBusiness() {
|
async getUnApprovedBusiness() {
|
||||||
const resp = await companyList({
|
const resp = await companyList({
|
||||||
examineStatus: 0,
|
examineStatus: 0,
|
||||||
@ -105,32 +114,20 @@ const useUserStore = defineStore("user", {
|
|||||||
this.unApprovedExpert = resp.total;
|
this.unApprovedExpert = resp.total;
|
||||||
},
|
},
|
||||||
async getUnApprovedAchivement() {
|
async getUnApprovedAchivement() {
|
||||||
const resp = await expertAchievementList({
|
const resp = await getUnApprovalCount("achievement");
|
||||||
status: 0,
|
this.unApprovedAchivement = resp.data ?? 0;
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
});
|
|
||||||
this.unApprovedAchivement = resp.total;
|
|
||||||
},
|
},
|
||||||
async getUnApprovedTechnology() {
|
async getUnApprovedTechnology() {
|
||||||
const resp = await businessList({ status: 0, pageNum: 1, pageSize: 10 });
|
const resp = await getUnApprovalCount("technology");
|
||||||
this.unApprovedTechnology = resp.total;
|
this.unApprovedTechnology = resp.data ?? 0;
|
||||||
},
|
},
|
||||||
async getUnApprovedService() {
|
async getUnApprovedService() {
|
||||||
const resp = await listCasDemand({
|
const resp = await getUnApprovalCount("service");
|
||||||
pageNum: 1,
|
this.unApprovedService = resp.data ?? 0;
|
||||||
pageSize: 10,
|
|
||||||
status: 0,
|
|
||||||
});
|
|
||||||
this.unApprovedService = resp.total;
|
|
||||||
},
|
},
|
||||||
async getUnApprovedProduct() {
|
async getUnApprovedProduct() {
|
||||||
const resp = await enterpriseProductApprovalList({
|
const resp = await getUnApprovalCount("product");
|
||||||
pageNum: 1,
|
this.unApprovedProduct = resp.data ?? 0;
|
||||||
pageSize: 10,
|
|
||||||
status: 0,
|
|
||||||
});
|
|
||||||
this.unApprovedProduct = resp.total;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async getServiceDemandTotal() {
|
async getServiceDemandTotal() {
|
||||||
|
|||||||
@ -51,6 +51,11 @@
|
|||||||
:disabled="!selectedIds.length"
|
:disabled="!selectedIds.length"
|
||||||
@click="handleDelete(...selectedIds)"
|
@click="handleDelete(...selectedIds)"
|
||||||
>批量删除</el-button
|
>批量删除</el-button
|
||||||
|
><el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="userStore.resetUnApproval('product', 'unApprovedProduct')"
|
||||||
|
>未读归零</el-button
|
||||||
>
|
>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 表格区域 -->
|
<!-- 表格区域 -->
|
||||||
|
|||||||
@ -218,7 +218,7 @@ const submitForm = async (status) => {
|
|||||||
case "2":
|
case "2":
|
||||||
successMessage = "已驳回";
|
successMessage = "已驳回";
|
||||||
}
|
}
|
||||||
userStore.getUnApprovedAchivement();
|
userStore.getUnApprovedAchivement("achievement");
|
||||||
ElMessage.success(successMessage);
|
ElMessage.success(successMessage);
|
||||||
router.back();
|
router.back();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -53,6 +53,14 @@
|
|||||||
@click="handleDelete(...selectedIds)"
|
@click="handleDelete(...selectedIds)"
|
||||||
>批量删除</el-button
|
>批量删除</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="
|
||||||
|
userStore.resetUnApproval('achievement', 'unApprovedAchivement')
|
||||||
|
"
|
||||||
|
>未读归零</el-button
|
||||||
|
>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 表格区域 -->
|
<!-- 表格区域 -->
|
||||||
<el-table :data="dataList" @selection-change="handleSelectionChange">
|
<el-table :data="dataList" @selection-change="handleSelectionChange">
|
||||||
@ -115,6 +123,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
// import SiteOptions from "@/views/components/SiteOptions";
|
||||||
|
// import {} from "../../../api/dataApproval/achivement";
|
||||||
import { reactive, ref, toRefs } from "vue";
|
import { reactive, ref, toRefs } from "vue";
|
||||||
import { tenantSelect } from "@/api/subPlatform/tenant";
|
import { tenantSelect } from "@/api/subPlatform/tenant";
|
||||||
import {
|
import {
|
||||||
@ -122,15 +132,15 @@ import {
|
|||||||
batchAchievement,
|
batchAchievement,
|
||||||
deleteAchievementByIds,
|
deleteAchievementByIds,
|
||||||
} from "@/api/dataApproval/achivement";
|
} from "@/api/dataApproval/achivement";
|
||||||
import SiteOptions from "@/views/components/SiteOptions";
|
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
// import {} from "../../../api/dataApproval/achivement";
|
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
status: 0,
|
status: 0,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -141,10 +151,10 @@ const dataList = ref([]);
|
|||||||
const siteList = ref([]);
|
const siteList = ref([]);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
// 获取站点列表
|
// 获取站点列表
|
||||||
const getSiteList = async () => {
|
// const getSiteList = async () => {
|
||||||
const resp = await tenantSelect();
|
// const resp = await tenantSelect();
|
||||||
siteList.value = resp.rows;
|
// siteList.value = resp.rows;
|
||||||
};
|
// };
|
||||||
// getSiteList();
|
// getSiteList();
|
||||||
|
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
|
|||||||
@ -54,6 +54,12 @@
|
|||||||
@click="handleDelete(...selectedIds)"
|
@click="handleDelete(...selectedIds)"
|
||||||
>批量删除</el-button
|
>批量删除</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="userStore.resetUnApproval('technology', 'unApprovedTechnology')"
|
||||||
|
>未读归零</el-button
|
||||||
|
>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 表格区域 -->
|
<!-- 表格区域 -->
|
||||||
<el-table :data="dataList" @selection-change="handleSelectionChange">
|
<el-table :data="dataList" @selection-change="handleSelectionChange">
|
||||||
|
|||||||
@ -56,6 +56,11 @@
|
|||||||
:disabled="!selectedIds.length"
|
:disabled="!selectedIds.length"
|
||||||
@click="handleDelete(...selectedIds)"
|
@click="handleDelete(...selectedIds)"
|
||||||
>批量删除</el-button
|
>批量删除</el-button
|
||||||
|
><el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="userStore.resetUnApproval('service', 'unApprovedService')"
|
||||||
|
>未读归零</el-button
|
||||||
>
|
>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 表格区域 -->
|
<!-- 表格区域 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user