From cc8da3c68c347ac93459bc9f3547356c84fe61f6 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期三, 19 三月 2025 11:02:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
src/views/business/inspectionReview/index.vue | 111 ++++++++++++++++++++++++++++++-------------------------
1 files changed, 61 insertions(+), 50 deletions(-)
diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue
index c724ca4..8705d53 100644
--- a/src/views/business/inspectionReview/index.vue
+++ b/src/views/business/inspectionReview/index.vue
@@ -23,8 +23,8 @@
</div>
<div>
<lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
- :rowClassName="rowClassName" :height="'calc(100vh - 270px)'" @pagination="pagination"
- key="tableData0"></lims-table>
+ :rowClassName="rowClassName" :height="'calc(100vh - 270px)'" @pagination="pagination"
+ key="tableData0"></lims-table>
</div>
<!--鎶ュ憡鏌ョ湅-->
<el-dialog title="鎶ュ憡鏌ョ湅" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false"
@@ -47,7 +47,6 @@
<script>
import { getYearAndMonthAndDays } from "@/utils/date";
-// import ShowInfo from "../do/b1-material-ins-order/showInfo.vue";
import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue";
import limsTable from "@/components/Table/lims-table.vue";
import { selectInsOrderPlanList, selectUserCondition } from "@/api/business/inspectionTask";
@@ -56,11 +55,11 @@
import filePreview from "@/components/Preview/filePreview.vue";
export default {
+ name: 'InspectionReview',
components: {
filePreview,
onlyoffice,
limsTable,
- // ShowInfo,
},
dicts: ["urgency_level", "inspection_task_state"],
computed: {
@@ -109,7 +108,18 @@
prop: "type",
dataType: "tag",
formatData: (params) => {
- return this.urgencyLevel.find((m) => m.value == params).label;
+ if (this.urgencyLevel.find((m) => m.value == params)) {
+ return this.urgencyLevel.find((m) => m.value == params).label;
+ } else {
+ return null
+ }
+ },
+ formatType: (params) => {
+ if (this.urgencyLevel.find((m) => m.value == params)) {
+ return this.urgencyLevel.find((m) => m.value == params).type;
+ } else {
+ return null
+ }
},
},
{
@@ -129,11 +139,18 @@
prop: "insState",
dataType: "tag",
formatData: (params) => {
- return this.inspectionTaskState.find((m) => m.value == params)
- .label;
+ if (this.inspectionTaskState.find((m) => m.value == params)) {
+ return this.inspectionTaskState.find((m) => m.value == params).label;
+ } else {
+ return null
+ }
},
formatType: (params) => {
- return this.inspectionTaskState.find((m) => m.value == params).type;
+ if (this.inspectionTaskState.find((m) => m.value == params)) {
+ return this.inspectionTaskState.find((m) => m.value == params).type;
+ } else {
+ return null
+ }
},
},
{ label: "妫�楠屼汉", prop: "userName" },
@@ -154,7 +171,7 @@
this.handleReview(row);
},
disabled: (row) => {
- return row.userName == null || row.userName && !row.userName.includes(this.nickName)
+ return row.checkName == null || (row.checkName && !row.checkName.includes(this.nickName))
}
},
{
@@ -230,10 +247,10 @@
fullscreen: false,
option: null,
orderTypeList: [
- { label: '濮旀墭璇曢獙', value: 'Customer-ordered test' },
- { label: '鎶芥', value: '鎶芥' },
- { label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�' },
- { label: '瀛e害妫�楠�', value: 'Quarterly inspection' },
+ { label: '濮旀墭璇曢獙', value: 'Customer-ordered test', type: 'success' },
+ { label: '鎶芥', value: '鎶芥', type: 'danger' },
+ { label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�', type: 'info' },
+ { label: '瀛e害妫�楠�', value: 'Quarterly inspection', type: '' },
],
urgencyLevel: [],
inspectionTaskState: [],
@@ -250,6 +267,9 @@
this.currentTime = getYearAndMonthAndDays()
},
mounted() {
+ this.refreshTable()
+ },
+ activated() {
this.refreshTable()
},
methods: {
@@ -284,13 +304,6 @@
}
return "";
},
- // 鏌ョ湅浜т笟閾句俊鎭�
- // openInfoDialog (row) {
- // this.showInfoDialog = true
- // this.$nextTick(() => {
- // this.$refs.showInfoDialog.getInfo(row.ifsInventoryId)
- // })
- // },
selectAllByOne(row) {
this.isCopper = row.isCopper
this.customsInspection = row
@@ -343,14 +356,14 @@
},
})
},
- // 涓婁紶鎶ュ憡
- handleUpload(row) {
-
- },
// 涓嬭浇鎶ュ憡
download(row) {
- let url = this.javaApi + '/word/' + (row.urlS === null || row.urlS === '') ? row.url : row.urlS
- this.$download.saveAs(url, row.fileName);
+ let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS
+ const link = document.createElement('a');
+ link.href = this.javaApi + url;
+ link.target = '_blank';
+ document.body.appendChild(link);
+ link.click();
},
// 杩樺師鎿嶄綔
handleRestore(row) {
@@ -370,30 +383,28 @@
},
// 鏌ョ湅鎶ュ憡
handleIssued(row) {
- if (!row.tempUrlPdf) return this.$message.warning('鏂囦欢鏈笂浼�')
- this.currentInfo = row
- this.lookDialogVisible = true
- // this.currentInfo = row;
- // let fileName = row.url
- // let fileType = "docx"
- // if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
- // fileName = row.tempUrlPdf
- // fileType = "pdf"
- // }
- // fileName = fileName.replace('/word/','')
- // const userName = this.nickName
- // this.option = {
- // url: this.javaApi + "/word/" + fileName,
- // isEdit: false,
- // fileType: fileType,
- // title: fileName,
- // lang: 'zh-CN',
- // isPrint: false,
- // user_id: 1,
- // user_name: userName,
- // editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
- // }
- // this.issuedVisible = true;
+ // todo: 鏌ョ湅鎶ュ憡缁勪欢
+ this.currentInfo = row;
+ let fileName = row.url
+ let fileType = "docx"
+ if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
+ fileName = row.tempUrlPdf
+ fileType = "pdf"
+ }
+ fileName = fileName.replace('/word/','')
+ const userName = this.nickName
+ this.option = {
+ url: this.javaApi + "/word/" + fileName,
+ isEdit: false,
+ fileType: fileType,
+ title: fileName,
+ lang: 'zh-CN',
+ isPrint: false,
+ user_id: 1,
+ user_name: userName,
+ editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
+ }
+ this.issuedVisible = true;
},
getAuthorizedPerson() {
selectUserCondition({ type: 1 }).then((res) => {
--
Gitblit v1.9.3