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/outsourcedProcessFlow/index.vue | 51 ++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 38 insertions(+), 13 deletions(-)
diff --git a/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessFlow/index.vue b/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessFlow/index.vue
index d251cb3..b44f5a7 100644
--- a/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessFlow/index.vue
+++ b/src/views/work/qualityInfo/outsourcingCooperate/outsourcedProcessFlow/index.vue
@@ -21,19 +21,28 @@
</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-form-item>
</el-form>
</div>
<!-- 表格数据 -->
<el-table v-loading="loading" :data="dataList" :border="true">
<el-table-column label="序号" type="index" align="center" width="80"/>
- <el-table-column label="供应商" prop="supplierName" align="center"/>
- <el-table-column label="工艺流程图" align="center">
+ <el-table-column label="年份" prop="year" align="center"/>
+ <el-table-column label="文件名称" prop="fileName" align="center"/>
+ <el-table-column label="文件" align="center">
<template #default="scope">
- <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.fileName !== '' ?scope.row.fileName + scope.row.format : '工艺流程图'}}</el-link>
+ <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.fileName !== '' ?scope.row.fileName + scope.row.format : '文件'}}</el-link>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
@@ -79,7 +88,8 @@
pageNum: 1,
pageSize: 10,
companyId: null,
- osType: 1
+ osType: 1,
+ year:''
},
total: 0,
dataList: [],
@@ -98,13 +108,16 @@
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 getOutsourcedCommonList(data.queryParams)
@@ -184,13 +197,25 @@
/** 重置新增的表单以及其他数据 */
const reset= async()=> {
- data.queryParams = {
- pageNum: 1,
- pageSize: 10,
- companyId: null,
- osType: 1
+ if(data.isAdmin){
+ data.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ companyId: null,
+ osType: 1,
+ year: '',
+ }
+ await getCompanyList()
+ }else {
+ data.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ companyId: data.queryParams.companyId,
+ osType: 1,
+ year: '',
+ }
}
- await getCompanyList()
+ await getNowYear()
await getList()
}
const handleDelete = (val) => {
--
Gitblit v1.9.2