From 15a79f18ace29e0c69d68c7fb5e3079b395ffecd Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期五, 14 三月 2025 10:20:21 +0800 Subject: [PATCH] 外来文件确认记录分页修改 --- src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue | 54 ++++++++++++++++++------------------------------------ 1 files changed, 18 insertions(+), 36 deletions(-) diff --git a/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue b/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue index 7928ac9..f642c37 100644 --- a/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue +++ b/src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue @@ -190,10 +190,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 +247,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 +303,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 +327,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 +444,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 +491,6 @@ }) .then(() => { delManageDocumentControlled({ id: row.id }).then((res) => { - if (res.code == 201) return; this.$message.success("鍒犻櫎鎴愬姛"); this.refresh(); }); -- Gitblit v1.9.3