From 4d5264ead8c96c78c9928e22fc66b0af190ed180 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: Fri, 08 May 2026 11:06:42 +0800
Subject: [PATCH] 修改loading
---
src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessReview/index.vue | 50 ++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 40 insertions(+), 10 deletions(-)
diff --git a/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessReview/index.vue b/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessReview/index.vue
index 7d7b3af..955bec7 100644
--- a/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessReview/index.vue
+++ b/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessReview/index.vue
@@ -11,7 +11,7 @@
v-hasPermi="['outsourcedProcessReview:add']"
>新增</el-button>
</el-form-item>
- <el-form-item v-if="isAdmin" label="企业:" >
+ <el-form-item v-if="isAdmin" label="单位:" >
<el-select v-model="data.queryParams.companyId" placeholder="请选择" clearable>
<el-option
v-for="item in companyList"
@@ -21,9 +21,17 @@
</el-option>
</el-select>
</el-form-item>
+ <el-form-item label="年份:" style="margin-left: 20px">
+ <el-date-picker
+ v-model="data.queryParams.year"
+ type="year"
+ value-format="YYYY"
+ placeholder="请选择年份"
+ />
+ </el-form-item>
<el-form-item >
- <el-button v-if="isAdmin" type="primary" @click="getList">查询</el-button>
- <el-button v-if="isAdmin" type="primary" plain @click="reset">重置</el-button>
+ <el-button type="primary" @click="getList">查询</el-button>
+ <el-button type="primary" plain @click="reset">重置</el-button>
<!-- <el-button type="primary">导出</el-button>-->
</el-form-item>
</el-form>
@@ -31,6 +39,7 @@
<!-- 表格数据 -->
<el-table v-loading="loading" :data="dataList" :border="true">
<el-table-column type="index" label="序号"></el-table-column>
+ <el-table-column prop="applyDeptDate" align="center" label="申请日期"></el-table-column>
<el-table-column prop="reviewName" align="center" label="评审表名称">
<template #default="scope">
{{scope.row.reviewName}}
@@ -86,7 +95,8 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- companyId: null
+ companyId: null,
+ year:''
},
total: 0,
dataList: [],
@@ -149,18 +159,27 @@
data.isAdmin = false
data.queryParams.companyId = userStore.companyId
}
+ await getNowYear()
await getList()
})
onUnmounted(()=>{
})
+const getNowYear = () =>{
+ data.queryParams.year = new Date().getFullYear().toString()
+}
const getList = async () => {
loading.value = true
const res = await getOutsourcedReviewList(data.queryParams)
if(res.code == 200){
- data.dataList = res.data.list || []
+ data.dataList = res.data.list.map(item => {
+ return {
+ ...item,
+ applyDeptDate: item.applyDeptDate.substring(0,10)
+ }
+ }) || []
data.total = res.data.total
}else{
ElMessage.warning(res.message)
@@ -269,12 +288,23 @@
/** 重置新增的表单以及其他数据 */
const reset= async()=> {
- data.queryParams = {
- pageNum: 1,
- pageSize: 10,
- companyId: null
+ if(data.isAdmin){
+ data.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ companyId: null,
+ year: '',
+ }
+ await getCompanyList()
+ }else {
+ data.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ companyId: data.queryParams.companyId,
+ year: '',
+ }
}
- await getCompanyList()
+ await getNowYear()
await getList()
}
const handleDelete = (val) => {
--
Gitblit v1.9.2