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/documentControl/components/ControlledFileApplication.vue | 112 ++++++++++++++++----------------------------------------
1 files changed, 32 insertions(+), 80 deletions(-)
diff --git a/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue b/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
index 7928ac9..5c6b8da 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
@@ -1,24 +1,21 @@
<template>
<!-- 鏂囦欢鍙楁帶鐢宠 -->
- <div class="controlled-file-application" style="height: 100%;">
- <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.documentCode"
- @keyup.enter.native="refreshTable()"></el-input></div>
+ <div>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 128px;font-size: 14px;font-weight: 700;color: #606266;">鐢宠鏂囦欢缂栧彿</span>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.documentCode"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </div>
+ <div style="line-height: 30px;">
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </div>
</div>
- <!-- <div class="search_thing">
- <div class="search_label">鐢宠浜猴細</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="queryParams.createUserName" @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="btns" style="padding-left: 30px;">
- <el-button size="small" type="primary"
- @click="addDialogVisible = true, addInfo = {}, file = null">鏂囦欢鍙楁帶鐢宠</el-button>
+ <div style="line-height: 30px;">
+ <el-button size="small" type="primary" icon="el-icon-plus"
+ @click="addDialogVisible = true, addInfo = {}, file = null">鏂囦欢鍙楁帶鐢宠</el-button>
</div>
</div>
<div class="table">
@@ -190,10 +187,18 @@
{
label: "鏂囦欢绫诲埆", prop: "type", width: "120px", dataType: "tag",
formatData: (params) => {
- return this.fileType.find((m) => m.value == params).label;
+ if(this.fileType.find((m) => m.value == params)) {
+ return this.fileType.find((m) => m.value == params).label;
+ } else {
+ return null
+ }
},
formatType: (params) => {
- return this.fileType.find((m) => m.value == params).type;
+ if(this.fileType.find((m) => m.value == params)) {
+ return this.fileType.find((m) => m.value == params).type;
+ } else {
+ return null
+ }
},
},
{
@@ -239,7 +244,12 @@
this.handleCheck(row);
},
disabled: (row) => {
- return !row.dutyUserName.includes(this.nickName) || row.state == '閫氳繃'
+ if(row.dutyUserName != null && row.dutyUserName != "") {
+ return !row.dutyUserName.includes(this.nickName) || row.state == '閫氳繃'
+ }else {
+ return false
+ }
+
}
},
{
@@ -313,37 +323,6 @@
this.queryParams = {};
this.page.current = 1;
this.getList();
- },
- getPower() {
- let power = JSON.parse(sessionStorage.getItem('power'))
- let up = false
- let del = false
- let add = false
- // let check = false
- for (var i = 0; i < power.length; i++) {
- if (power[i].menuMethod == 'addManageDocumentControlled') {
- up = true
- }
- if (power[i].menuMethod == 'addManageDocumentControlled') {
- add = true
- }
- if (power[i].menuMethod == 'delManageDocumentControlled') {
- del = true
- }
- // if (power[i].menuMethod == 'checkManageDocumentControlled') {
- // check = true
- // }
- }
- // if (!check) {
- // this.componentData.do.splice(2, 1)
- // }
- if (!del) {
- this.componentData.do.splice(1, 1)
- }
- if (!up) {
- this.componentData.do.splice(0, 1)
- }
- this.addPower = add
},
getAuthorizedPerson() {
selectUserCondition().then(res => {
@@ -461,7 +440,7 @@
},
handleDown(row) {
if (!row.url) return this.$message.warning('鏂囦欢鏈笂浼�')
- this.$download.downloadFileFromUrl(row.url, row.url);
+ this.$download.saveAs(row.url, row.url);
},
async uploadPDF(pdfBlob) {
const formData = new FormData();
@@ -508,7 +487,6 @@
})
.then(() => {
delManageDocumentControlled({ id: row.id }).then((res) => {
- if (res.code == 201) return;
this.$message.success("鍒犻櫎鎴愬姛");
this.refresh();
});
@@ -520,19 +498,6 @@
</script>
<style scoped>
-.title {
- height: 60px;
- line-height: 60px;
-}
-
-.search {
- background-color: #fff;
- height: 40px;
- display: flex;
- align-items: center;
- position: relative;
-}
-
.search_thing {
width: 350px;
display: flex;
@@ -548,19 +513,6 @@
.search_input {
width: calc(100% - 110px);
}
-
-.table {
- background-color: #fff;
- height: calc(100% - 60px - 80px);
- padding: 20px;
-}
-
-.btns {
- position: absolute;
- right: 20px;
- top: 5px;
-}
-
.stamp {
cursor: pointer;
border: #fff 1px solid;
--
Gitblit v1.9.3