From dab59f7624a2fb8d4114bb67b554ff09d91f810c Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期四, 10 四月 2025 13:07:36 +0800 Subject: [PATCH] Merge branch 'radio-frequency-cable' of http://114.132.189.42:9002/r/lims-ruoyi-before into radio-frequency-cable --- src/views/business/inspectionReview/index.vue | 173 +++++++++++++++++++++++++++++---------------------------- 1 files changed, 87 insertions(+), 86 deletions(-) diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue index 7586d81..a3d259d 100644 --- a/src/views/business/inspectionReview/index.vue +++ b/src/views/business/inspectionReview/index.vue @@ -3,9 +3,8 @@ <div> <el-form :model="entity" ref="entity" size="small" :inline="true"> <el-form-item label="濮旀墭缂栧彿" prop="entrustCode"> - <el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="entity.entrustCode" - @keyup.enter.native="refreshTable()"></el-input> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.entrustCode" + @keyup.enter.native="refreshTable()"></el-input> </el-form-item> <el-form-item label="涓嬪崟绫诲埆" prop="entrustCode"> <el-select size="small" v-model="entity.typeSource" clearable style="width: 100%;" @change="refreshTable()"> @@ -13,38 +12,27 @@ </el-select> </el-form-item> <el-form-item> - <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button> - <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button> + <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button> + <el-button size="mini" @click="refresh">閲嶇疆</el-button> </el-form-item> </el-form> <div class="page_total"> <span>鎬昏浠诲姟鏁伴噺:</span> - <span>{{page.total}}</span> + <span>{{ page.total }}</span> </div> </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> -<!-- <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == null">--> -<!-- <Add :active="activeFace" :currentId="currentId"/>--> -<!-- </div>--> -<!-- <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == 0">--> -<!-- <CustomsInspection :active="activeFace" :customsInspection="customsInspection" :currentId="currentId"/>--> -<!-- </div>--> -<!-- <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == 1">--> -<!-- <CopperOrder :active="activeFace" :currentId="currentId"></CopperOrder>--> -<!-- </div>--> -<!-- <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :sonLaboratory="componentData.entity.sonLaboratory" :typeSource="typeSource" :state="state"/>--> -<!-- <!–浜т笟閾句俊鎭煡鐪�–>--> -<!-- <ShowInfo v-if="showInfoDialog" :showInfoDialog="showInfoDialog" ref="showInfoDialog"></ShowInfo>--> <!--鎶ュ憡鏌ョ湅--> <el-dialog title="鎶ュ憡鏌ョ湅" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false" - :fullscreen="fullscreen"> + :fullscreen="fullscreen"> <div class="full-screen"> - <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;" v-if="!fullscreen"></i> - <img src="@/assets/images/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen=false;" > + <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen = true;" + v-if="!fullscreen"></i> + <img src="@/assets/images/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen = false;"> </div> <div style="height: 80vh;" v-if="issuedVisible"> <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" /> @@ -52,28 +40,26 @@ </el-dialog> <el-dialog title="鏌ョ湅闄勪欢" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen> <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.tempUrlPdf" :currentFile="{}" - style="max-height: 90vh;overflow-y: auto;" /> + style="max-height: 90vh;overflow-y: auto;" /> </el-dialog> </div> </template> <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"; -import {mapGetters} from "vuex"; -import {upReportUrl} from "@/api/business/insReport"; -import {delfile} from "@/api/business/rawMaterialOrder"; +import { selectInsOrderPlanList, selectUserCondition } from "@/api/business/inspectionTask"; +import { mapGetters } from "vuex"; +import { upReportUrl } from "@/api/business/insReport"; import filePreview from "@/components/Preview/filePreview.vue"; export default { + name: 'InspectionReview', components: { filePreview, onlyoffice, limsTable, - // ShowInfo, }, dicts: ["urgency_level", "inspection_task_state"], computed: { @@ -112,7 +98,7 @@ if (params == 0) { return "鎴愬搧涓嬪崟"; } else { - return "鍘熸潗鏂欎笅鍗�"; + return "鍘熻緟鏉愪笅鍗�"; } }, }, @@ -122,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 + } }, }, { @@ -142,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" }, @@ -167,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)) } }, { @@ -222,31 +226,31 @@ upIndex: 0, planTotal: 0, insStateList: [], - state:0,//0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0 + state: 0,//0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0 activeFace: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝榛樿涓�0 examine: null, isReport: 0, currentId: null, orderId: 0, - personList:[], + personList: [], currentTime: null, - sonLaboratoryList:[], + sonLaboratoryList: [], typeSourceList: [ - {label: '鎴愬搧涓嬪崟', value: 0}, - {label: '鍘熸潗鏂欎笅鍗�', value: 1}, + { label: '鎴愬搧涓嬪崟', value: 0 }, + { label: '鍘熻緟鏉愪笅鍗�', value: 1 }, ], isCopper: null, customsInspection: {}, - typeSource: null,// 0:鎴愬搧涓嬪崟锛�1锛氬師鏉愭枡涓嬪崟 + typeSource: null,// 0:鎴愬搧涓嬪崟锛�1锛氬師杈呮潗涓嬪崟 showInfoDialog: false, // 浜т笟閾句俊鎭煡鐪� issuedVisible: false, fullscreen: false, - option:null, + 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: '鍙潬鎬ф楠�', value: 'Quarterly inspection', type: '' }, ], urgencyLevel: [], inspectionTaskState: [], @@ -263,6 +267,9 @@ this.currentTime = getYearAndMonthAndDays() }, mounted() { + this.refreshTable() + }, + activated() { this.refreshTable() }, methods: { @@ -297,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 @@ -313,7 +313,7 @@ this.currentId = parseInt(row.id) switch (row.isCopper) { case 0: - // 鍘熸潗鏂� + // 鍘熻緟鏉� this.$router.push({ path: "/materialOrder/customsInspection", query: { customsInspection: row, @@ -345,7 +345,7 @@ } }, // 澶嶆牳鍥炶皟 - handleReview(row){ + handleReview(row) { this.$router.push({ path: "/inspectionTask/inspection", query: { @@ -356,13 +356,9 @@ }, }) }, - // 涓婁紶鎶ュ憡 - handleUpload (row) { - - }, // 涓嬭浇鎶ュ憡 download(row) { - let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS + let url = (row.urlS === null || row.urlS === '') ? row.url : row.urlS const link = document.createElement('a'); link.href = this.javaApi + url; link.target = '_blank'; @@ -376,7 +372,7 @@ cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - upReportUrl({id: row.insReportId}).then(res => { + upReportUrl({ id: row.insReportId }).then(res => { if (res.code === 200) { this.$message.success('杩樺師鎴愬姛') this.refreshTable() @@ -387,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) => { @@ -430,5 +424,12 @@ <style scoped> .page_total { margin-bottom: 10px; + display: flex; +} + +.page_total span:last-child { + color: #3a7bfa; + font-size: 23px; + font-weight: 400; } </style> -- Gitblit v1.9.3