From d2e867966539004b6b5a73ae3566a659ac6f8b6d Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 30 十月 2025 11:55:34 +0800
Subject: [PATCH] 检验任务数据分类查询问题修复
---
src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue | 153 ++++++++++----------------------------------------
1 files changed, 32 insertions(+), 121 deletions(-)
diff --git a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
index c405704..59cadd7 100644
--- a/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/approvalRecord.vue
@@ -1,40 +1,39 @@
<template>
<!-- 鏂囦欢瀹℃壒璁板綍 -->
- <div class="DocumentApprovalRecords">
+ <div class="capacity-scope">
<div class="search">
- <div class="search_thing">
- <div class="search_label">鏂囦欢鍚嶇О锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentName"
- @keyup.enter.native="refreshTable()"></el-input></div>
+ <div>
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
+ <el-form-item label="鏂囦欢鍚嶇О" prop="documentName">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentName"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item label="鏂囦欢缂栧彿" prop="documentCode">
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
</div>
- <div class="search_thing">
- <div class="search_label">鏂囦欢缂栧彿锛�</div>
- <div class="search_input">
- <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
- @keyup.enter.native="refreshTable()"></el-input>
- </div>
- </div>
- <div class="search_thing" style="padding-left: 30px;">
- <el-button size="small" @click="refresh()">閲� 缃�</el-button>
- <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
- </div>
- <div class="btn">
+ <div>
<el-button size="small" type="primary" @click="openAdd('鏂板')">鏂板</el-button>
- <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
- :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
- style="display:inline-block;margin-left: 20px;">
+ <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
+ :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
+ :on-success="handleSuccessUp" style="display: inline-block;margin: 0 8px">
<el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
- <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
- style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
+ <el-button size="small" type="primary" @click="handleDown" :loading="outLoading">瀵煎嚭</el-button>
</div>
</div>
<div class="table">
<lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
- :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
+ :height="'calc(100vh - 230px)'" @pagination="pagination"></lims-table>
</div>
<!-- 鏂板/缂栬緫 -->
<el-dialog :title="title" :visible.sync="addDia" width="500px">
- <el-form :model="addForm" ref="addForm" :rules="addRules" label-position="right" label-width="120px">
+ <el-form :model="addForm" ref="addForm" :rules="addRules" label-position="right" label-width="100px">
<el-form-item label="鏂囦欢鍚嶇О" prop="documentName">
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addForm.documentName"></el-input>
</el-form-item>
@@ -83,7 +82,6 @@
<script>
import limsTable from "@/components/Table/lims-table.vue";
-import { getToken } from "@/utils/auth";
import {
selectUserCondition,
} from "@/api/business/inspectionTask.js";
@@ -97,6 +95,7 @@
pageManageRecordCheck
} from '@/api/cnas/systemManagement/documentRecords.js'
export default {
+ name: 'ApprovalRecord',
components: {
limsTable
},
@@ -117,9 +116,9 @@
prop: "documentVersion",
},
{ label: "缂栧埗", prop: "writeUser" },
- { label: "瀹℃牳", prop: "checkUser" },
- { label: "鎵瑰噯", prop: "ratifyUser" },
- { label: "鎵瑰噯鏃ユ湡", prop: "ratifyDate" },
+ { label: "瀹℃牳浜�", prop: "checkUserName" },
+ { label: "鎵瑰噯浜�", prop: "ratifyUserName" },
+ // { label: "鎵瑰噯鏃ユ湡", prop: "ratifyDate" },
{ label: "澶囨敞", prop: "remark" },
{
dataType: "action",
@@ -186,11 +185,6 @@
},
// 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
computed: {
- headers() {
- return {
- 'Authorization': "Bearer " + getToken()
- }
- },
action() {
return this.javaApi + '/manageRecordCheck/exportInManageRecordCheck'
}
@@ -199,50 +193,6 @@
this.getAuthorizedPerson()
},
methods: {
- getPower() {
- let power = JSON.parse(sessionStorage.getItem('power'))
- let add = false
- let del = false
- let up = false;
- let out = false;
- let check = false
- let ratify = false
- for (var i = 0; i < power.length; i++) {
- if (power[i].menuMethod == 'addManageRecordCheck') {
- add = true
- }
- if (power[i].menuMethod == 'delManageRecordCheck') {
- del = true
- }
- if (power[i].menuMethod == 'exportInManageRecordCheck') {
- up = true
- }
- if (power[i].menuMethod == 'checkManageRecordCheck') {
- check = true
- }
- if (power[i].menuMethod == 'ratifyManageRecordCheck') {
- ratify = true
- }
- if (power[i].menuMethod == 'exportOutManageRecordCheck') {
- out = true
- }
- }
- if (!ratify) {
- this.componentData.do.splice(3, 1)
- }
- if (!check) {
- this.componentData.do.splice(2, 1)
- }
- if (!add) {
- this.componentData.do.splice(1, 1)
- }
- if (!del) {
- this.componentData.do.splice(0, 1)
- }
- this.addPower = add
- this.outPower = out
- this.upPower = up
- },
getList() {
this.tableLoading = true;
let param = { ...this.queryParams, ...this.page };
@@ -289,10 +239,7 @@
// queryParams
exportOutManageRecordCheck(this.queryParams).then(res => {
this.outLoading = false
- if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
- this.$message.success('瀵煎嚭鎴愬姛')
- let url = this.javaApi + 'word/' + res.message
- this.$download.saveAs(url, '鏂囦欢瀹℃壒璁板綍')
+ this.$download.saveAs(res.data, '鏂囦欢瀹℃壒璁板綍')
})
},
getAuthorizedPerson() {
@@ -305,7 +252,7 @@
})
})
this.personList = data
- this.refreshTable()()
+ this.refreshTable()
})
},
// 瀹℃牳
@@ -320,7 +267,6 @@
if (action === 'confirm') {
// 鐐瑰嚮鈥滅‘瀹氣�濇寜閽紝鍏佽鍏抽棴
checkManageRecordCheck({ id: row.id, checkState: '閫氳繃' }).then(res => {
- if (res.code === 201) return
this.refreshTable()
done();
this.$message({
@@ -334,7 +280,6 @@
} else if (action === 'cancel') {
// 鐐瑰嚮鈥滃彇娑堚�濇寜閽紝涓嶅厑璁稿叧闂�
checkManageRecordCheck({ id: row.id, checkState: '涓嶉�氳繃' }).then(res => {
- if (res.code === 201) return
this.refreshTable()
done();
this.$message({
@@ -366,7 +311,6 @@
if (action === 'confirm') {
// 鐐瑰嚮鈥滅‘瀹氣�濇寜閽紝鍏佽鍏抽棴
ratifyManageRecordCheck({ id: row.id, ratifyState: '閫氳繃' }).then(res => {
- if (res.code === 201) return
this.refreshTable()
done();
this.$message({
@@ -380,7 +324,6 @@
} else if (action === 'cancel') {
// 鐐瑰嚮鈥滃彇娑堚�濇寜閽紝涓嶅厑璁稿叧闂�
ratifyManageRecordCheck({ id: row.id, ratifyState: '涓嶉�氳繃' }).then(res => {
- if (res.code === 201) return
this.refreshTable()
done();
this.$message({
@@ -417,7 +360,7 @@
this.upLoading = false;
if (response.code == 200) {
this.$message.success('涓婁紶鎴愬姛');
- this.refreshTable()()
+ this.refreshTable()
} else {
this.$message.error('涓婁紶澶辫触');
}
@@ -469,7 +412,6 @@
})
.then(() => {
delManageRecordCheck({ id: row.id }).then((res) => {
- if (res.code == 201) return;
this.$message.success("鍒犻櫎鎴愬姛");
this.refresh();
});
@@ -482,39 +424,8 @@
<style scoped>
.search {
- background-color: #fff;
- height: 80px;
+ height: 46px;
display: flex;
- align-items: center;
- position: relative;
-}
-
-.search_thing {
- width: 350px;
- display: flex;
- align-items: center;
-}
-
-.search_label {
- width: 110px;
- font-size: 14px;
- text-align: right;
-}
-
-.search_input {
- width: calc(100% - 110px);
-}
-
-.btn {
- position: absolute;
- right: 16px;
- top: 20px;
-}
-
-.table {
- margin-top: 10px;
- background-color: #fff;
- height: calc(100% - 60px - 80px - 10px - 40px);
- padding: 20px;
+ justify-content: space-between;
}
</style>
--
Gitblit v1.9.3