From fa60bfa07970c192c85a437e7db784eccdae2839 Mon Sep 17 00:00:00 2001 From: 董国庆 <364620639@qq.com> Date: 星期一, 16 六月 2025 20:04:15 +0800 Subject: [PATCH] 修改bug --- laboratory/src/views/dataManagement/confirmation-sheet/index.vue | 69 ++++++++++++++++++++-------------- 1 files changed, 41 insertions(+), 28 deletions(-) diff --git a/laboratory/src/views/dataManagement/confirmation-sheet/index.vue b/laboratory/src/views/dataManagement/confirmation-sheet/index.vue index bba2b66..ab1112a 100644 --- a/laboratory/src/views/dataManagement/confirmation-sheet/index.vue +++ b/laboratory/src/views/dataManagement/confirmation-sheet/index.vue @@ -21,7 +21,7 @@ <el-form-item label="状态:"> <el-select v-model="form.auditStatus" placeholder="请选择"> <el-option label="待确认" :value="1"></el-option> - <el-option label="已通过" :value="2"></el-option> + <el-option label="已确认" :value="2"></el-option> <el-option label="已驳回" :value="3"></el-option> <el-option label="已撤回" :value="4"></el-option> <el-option label="已封存" :value="5"></el-option> @@ -38,10 +38,10 @@ <div class="flex a-center" style="gap: 16px;"> <div class="title pointer" :class="{ active: !isDrafts }" @click="switchToDrafts(false)"> 检验方法确认单列表</div> - <div class="drafts pointer" :class="{ active: isDrafts }" @click="switchToDrafts(true)">草稿箱 + <div class="drafts pointer" v-if="userRole == '4'" :class="{ active: isDrafts }" @click="switchToDrafts(true)">草稿箱 </div> </div> - <el-button @click="handleAddPlan" class="el-icon-plus" type="primary"> + <el-button v-if="userRole == '4'" @click="handleAddPlan" class="el-icon-plus" type="primary"> 新增检测方法确认单</el-button> </div> </template> @@ -60,29 +60,38 @@ </el-table-column> <el-table-column label="操作" width="200"> <template slot-scope="scope"> - <!-- 超级管理员(1)和审批人(2) --> - <template v-if="userRole == '1' || userRole == '2'"> - <el-button type="text" @click="handleDetail(scope.row)">详情</el-button> + <!-- 草稿箱状态下的操作 --> + <template v-if="isDrafts"> + <el-button type="text" @click="handleEdit(scope.row)">编辑</el-button> + <el-button type="text" @click="handleDelete(scope.row)">删除</el-button> </template> - <!-- 工艺工程师(3) --> - <template v-if="userRole == '3'"> - <el-button type="text" @click="handleReview(scope.row)" - v-if="scope.row.auditStatus == 1">审核</el-button> - <el-button type="text" @click="handleDetail(scope.row)" - v-if="scope.row.auditStatus == 2">详情</el-button> - </template> + <!-- 非草稿箱状态下的操作 --> + <template v-else> + <!-- 超级管理员(1)和审批人(2) --> + <template v-if="userRole == '1' || userRole == '2'"> + <el-button type="text" @click="handleDetail(scope.row)">详情</el-button> + </template> - <!-- 化验师(4) --> - <template v-if="userRole == '4'"> - <el-button type="text" @click="handleRevoke(scope.row)" - v-if="scope.row.auditStatus == 1">撤销</el-button> - <el-button type="text" @click="handleDetail(scope.row)" - v-if="scope.row.auditStatus === 2 || scope.row.auditStatus === 3">详情</el-button> - <el-button type="text" @click="handleEdit(scope.row)" - v-if="scope.row.auditStatus === 3">编辑</el-button> - <el-button type="text" @click="handleDelete(scope.row)" - v-if="scope.row.auditStatus === 3">删除</el-button> + <!-- 工艺工程师(3) --> + <template v-if="userRole == '3'"> + <el-button type="text" @click="handleReview(scope.row)" + v-if="scope.row.auditStatus == 1">审核</el-button> + <el-button type="text" @click="handleDetail(scope.row)" + v-if="scope.row.auditStatus == 2">详情</el-button> + </template> + + <!-- 化验师(4) --> + <template v-if="userRole == '4'"> + <el-button type="text" @click="handleRevoke(scope.row)" + v-if="scope.row.auditStatus == 1">撤销</el-button> + <el-button type="text" @click="handleDetail(scope.row)" + v-if="scope.row.auditStatus == 2 || scope.row.auditStatus == 3">详情</el-button> + <el-button type="text" @click="handleEdit(scope.row)" + v-if="scope.row.auditStatus == 3">编辑</el-button> + <el-button type="text" @click="handleDelete(scope.row)" + v-if="scope.row.auditStatus == 3">删除</el-button> + </template> </template> </template> </el-table-column> @@ -160,7 +169,7 @@ auditStatus: this.isDrafts ? -1 : Number(this.form.auditStatus) || '' }; const res = await getList(params); - if (res.code === 200) { + if (res.code == 200) { this.tableData = res.data.records || []; this.total = res.data.total || 0; } @@ -170,7 +179,7 @@ } }, handleDateChange(val) { - if (val && val.length === 2) { + if (val && val.length == 2) { this.form.startTime = val[0]; this.form.endTime = val[1]; } else { @@ -251,8 +260,11 @@ }, handleEdit(row) { this.$router.push({ - path: "/dataManagement/confirmation-sheet/edit", - query: { id: row.id } + path: "/dataManagement/confirmation-sheet/add", + query: { + id: row.id, + type: 'edit' + } }); }, handleDelete(row) { @@ -320,7 +332,6 @@ background: #ffffff; border-radius: 8px 8px 0px 0px; padding: 16px 29px; - font-weight: bold; font-size: 18px; background: #fafafc; border: 1px solid #dcdfe6; @@ -331,6 +342,8 @@ background: #ffffff; border: 1px solid #049c9a !important; color: #049c9a; + font-weight: bold; + } } -- Gitblit v1.7.1