From 3d191afba4d90a4f18b5cb9941ef10552d413309 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期日, 16 三月 2025 20:35:52 +0800
Subject: [PATCH] 修改全局人员查询
---
src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue | 141 ++++++++++++++++++-----------------------------
1 files changed, 54 insertions(+), 87 deletions(-)
diff --git a/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue b/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
index 81b5f6a..4487da6 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
@@ -1,24 +1,22 @@
<template>
<!-- 鏂囦欢鍙楁帶鐢宠 -->
- <div class="controlled-file-application" style="height: 100%;">
+ <div>
<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>
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
+ <el-form-item label="鐢宠鏂囦欢缂栧彿" prop="laboratoryName">
+ <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" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
+ <el-button icon="el-icon-refresh" 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.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>
+ <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 +188,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 +245,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
+ }
+
}
},
{
@@ -290,6 +301,7 @@
delete param.total;
pageManageDocumentControlled({ ...param })
.then((res) => {
+ console.log('res',res)
this.tableLoading = false;
if (res.code === 200) {
this.tableData = res.data.records;
@@ -313,37 +325,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 => {
@@ -433,6 +414,7 @@
handleUpdate(row) {
this.title = '鏂囦欢鍙樻洿鐢宠'
this.addInfo = this.HaveJson(row)
+ this.file = null
this.addDialogVisible = true
},
// 鏌ョ湅闄勪欢
@@ -460,8 +442,7 @@
},
handleDown(row) {
if (!row.url) return this.$message.warning('鏂囦欢鏈笂浼�')
- let url = this.javaApi + '/word/' + row.url
- this.$download.saveAs(url, row.url);
+ this.$download.saveAs(row.url, row.url);
},
async uploadPDF(pdfBlob) {
const formData = new FormData();
@@ -470,18 +451,25 @@
formData.append('state', this.type); // 鏂囦欢鍚嶅瓧娈�
formData.append('writer', this.currentInfo.writer); // 鏂囦欢鍚嶅瓧娈�
- let res = await checkManageDocumentControlled(formData)
- this.checkLoading = false
- this.noCheckLoading = false
- if (res.code == 200) {
- this.$message({ message: '鎿嶄綔鎴愬姛', type: 'success' });
- this.checkDialogVisible = false;
- this.refreshTable()
- return true
- } else {
- this.$message({ message: '鎿嶄綔澶辫触', type: 'error' });
- return false
+ try {
+ let res = await checkManageDocumentControlled(formData)
+ this.checkLoading = false
+ this.noCheckLoading = false
+ if (res.code == 200) {
+ this.$message({ message: '鎿嶄綔鎴愬姛', type: 'success' });
+ this.checkDialogVisible = false;
+ this.refreshTable()
+ return true
+ } else {
+ this.$message({ message: '鎿嶄綔澶辫触', type: 'error' });
+ return false
+ }
+ } catch (e) {
+ this.checkLoading = false
+ this.noCheckLoading = false
}
+
+
},
handleCheckSub(type) {
this.type = type
@@ -501,7 +489,6 @@
})
.then(() => {
delManageDocumentControlled({ id: row.id }).then((res) => {
- if (res.code == 201) return;
this.$message.success("鍒犻櫎鎴愬姛");
this.refresh();
});
@@ -513,17 +500,10 @@
</script>
<style scoped>
-.title {
- height: 60px;
- line-height: 60px;
-}
-
.search {
- background-color: #fff;
- height: 40px;
+ height: 46px;
display: flex;
- align-items: center;
- position: relative;
+ justify-content: space-between;
}
.search_thing {
@@ -541,19 +521,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