From 60322c503d201e4d1000e62d8ecf17db4f628e4c Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 12 三月 2025 15:49:23 +0800
Subject: [PATCH] 合并冲突
---
src/views/business/reportPreparation/index.vue | 1919 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 1,915 insertions(+), 4 deletions(-)
diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue
index dc7e6a8..c5df9d9 100644
--- a/src/views/business/reportPreparation/index.vue
+++ b/src/views/business/reportPreparation/index.vue
@@ -1,9 +1,1920 @@
+<style scoped>
+.title {
+ height: 60px;
+ line-height: 60px;
+}
+
+.search {
+ background-color: #fff;
+ height: 80px;
+ display: flex;
+ align-items: center;
+}
+
+.search_thing {
+ display: flex;
+ align-items: center;
+ height: 50px;
+ width: 230px;
+}
+
+.search_label {
+ width: 90px;
+ font-size: 14px;
+ text-align: right;
+}
+
+.search_input {
+ width: calc(100% - 90px);
+}
+
+.table {
+ margin-top: 10px;
+ background-color: #fff;
+ width: calc(100% - 40px);
+ height: calc(100% - 60px - 80px - 10px - 40px);
+ padding: 20px;
+}
+
+.el-form-item {
+ margin-bottom: 16px;
+}
+
+.full-screen {
+ position: absolute;
+ right: 52px;
+ top: 22px;
+}
+
+.btns {
+ position: absolute;
+ right: 40px;
+ top: 50%;
+ transform: translate(0, -50%);
+ display: flex;
+ align-items: center;
+}
+
+.fullscreen {
+ height: 82vh;
+}
+.custom-upload >>> .el-upload-list--text {
+ max-height: 20vh;
+ overflow-y: scroll;
+}
+</style>
+
<template>
- <div>鎶ュ憡缂栧埗</div>
+ <div class="inspection_order">
+ <div style="width: 100%; height: 100%">
+ <div>
+ <el-row class="title">
+ <el-col :span="12" style="padding-left: 20px; text-align: left"
+ >鎶ュ憡缂栧埗</el-col
+ >
+ </el-row>
+ </div>
+ <div class="search" :style="`height: ${more ? 130 : 80}px;`">
+ <el-row :gutter="10" style="width: 100%">
+ <el-col :span="16" style="display: flex; flex-wrap: wrap">
+ <div class="search_thing" v-if="maxNum >= 1">
+ <div class="search_label">鎶ュ憡缂栧彿锛�</div>
+ <div class="search_input">
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="entity.code"
+ @keyup.enter.native="refreshTable()"
+ ></el-input>
+ </div>
+ </div>
+ <div class="search_thing" v-if="maxNum >= 2">
+ <div class="search_label">涓婁紶鐘舵�侊細</div>
+ <div class="search_input">
+ <el-select
+ size="small"
+ clearable
+ @clear="refreshTable()"
+ @change="refreshTable()"
+ v-model="entity.isUpload"
+ >
+ <el-option
+ v-for="(item, index) in tagField.isUpload.select"
+ :value="item.value"
+ :label="item.label"
+ :key="index"
+ ></el-option>
+ </el-select>
+ </div>
+ </div>
+ <div class="search_thing" v-if="maxNum >= 3">
+ <div class="search_label">鎻愪氦鐘舵�侊細</div>
+ <div class="search_input">
+ <el-select
+ size="small"
+ clearable
+ @clear="refreshTable()"
+ @change="refreshTable()"
+ v-model="entity.state"
+ >
+ <el-option
+ v-for="(item, index) in tagField.state.select"
+ :value="item.value"
+ :label="item.label"
+ :key="index"
+ ></el-option>
+ </el-select>
+ </div>
+ </div>
+ <div
+ class="search_thing"
+ v-if="maxNum >= 4 || (maxNum < 4 && more)"
+ >
+ <div class="search_label">瀹℃牳鐘舵�侊細</div>
+ <div class="search_input">
+ <el-select
+ size="small"
+ clearable
+ @clear="refreshTable()"
+ @change="refreshTable()"
+ v-model="entity.isExamine"
+ >
+ <el-option
+ v-for="(item, index) in tagField.isExamine.select"
+ :value="item.value"
+ :label="item.label"
+ :key="index"
+ ></el-option>
+ </el-select>
+ </div>
+ </div>
+ <div class="search_thing" v-if="maxNum >= 5 || more">
+ <div class="search_label">鎵瑰噯鐘舵�侊細</div>
+ <div class="search_input">
+ <el-select
+ size="small"
+ clearable
+ @clear="refreshTable()"
+ @change="refreshTable()"
+ v-model="entity.isRatify"
+ >
+ <el-option
+ v-for="(item, index) in tagField.isRatify.select"
+ :value="item.value"
+ :label="item.label"
+ :key="index"
+ ></el-option>
+ </el-select>
+ </div>
+ </div>
+ <div class="search_thing" v-if="maxNum >= 6 || more">
+ <div class="search_label">鍒涘缓鏃堕棿锛�</div>
+ <div class="search_input">
+ <el-date-picker
+ size="small"
+ clearable
+ @clear="refreshTable()"
+ @change="refreshTable()"
+ v-model="entity.createTimeRange"
+ type="daterange"
+ value-format="yyyy-MM-dd[T]HH:mm:ss"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ :default-time="['00:00:00', '23:59:59']"
+ >
+ </el-date-picker>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="8">
+ <div class="search_thing">
+ <el-button
+ v-if="maxNum < 5"
+ type="text"
+ :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
+ style="color: #3a7bfa"
+ @click="more = !more"
+ >{{ !more ? "鏇村" : "鏀惰捣" }}</el-button
+ >
+ <div class="search_thing" style="padding-left: 20px">
+ <el-button
+ size="small"
+ @click="refresh()"
+ style="margin-right: 6px"
+ >閲� 缃�</el-button
+ >
+ <el-button
+ size="small"
+ type="primary"
+ @click="refreshTable()"
+ style="margin-right: 6px"
+ >鏌� 璇�</el-button
+ >
+ <template>
+ <el-dropdown
+ @command="handleCommand"
+ style="margin-left: 10px"
+ >
+ <el-button type="primary" size="small">
+ 鏇村鎿嶄綔<i class="el-icon-arrow-down el-icon--right"></i>
+ </el-button>
+ <el-dropdown-menu slot="dropdown">
+ <el-dropdown-item
+ icon="el-icon-download"
+ command="batchDownload"
+ >鎵归噺涓嬭浇</el-dropdown-item
+ >
+ <el-dropdown-item
+ icon="el-icon-upload"
+ command="batchUpload"
+ >鎵归噺涓婁紶</el-dropdown-item
+ >
+ <el-dropdown-item
+ icon="el-icon-s-check"
+ command="oneClickApproval"
+ >涓�閿鎵�</el-dropdown-item
+ >
+ <el-dropdown-item
+ icon="el-icon-setting"
+ command="approvalConfig"
+ >瀹℃壒绛惧悕閰嶇疆</el-dropdown-item
+ >
+ </el-dropdown-menu>
+ </el-dropdown>
+ </template>
+ <template>
+ <el-button
+ size="small"
+ type="primary"
+ @click="handleDowns"
+ :loading="outLoading"
+ style="margin-right: 6px"
+ >鎵归噺涓嬭浇</el-button
+ >
+ <el-button
+ size="small"
+ type="primary"
+ @click="openBatchUploadDia()"
+ :loading="inLoading"
+ >鎵归噺涓婁紶</el-button
+ >
+ <el-button
+ size="small"
+ type="primary"
+ @click="oneClickApproval()"
+ :loading="approvalLoading"
+ >涓�閿鎵�</el-button
+ >
+ <el-button
+ size="small"
+ type="primary"
+ @click="openApprovalConfig()"
+ :loading="approvalConfigLoading"
+ >瀹℃壒绛惧悕閰嶇疆</el-button
+ >
+ </template>
+ </div>
+ <!-- <div class="btns">
+ <el-button size="small" type="primary" @click="handleDowns" :loading="outLoading" style="margin-right: 16px;">鎵归噺涓嬭浇</el-button>
+ <el-button size="small" type="primary" @click="openBatchUploadDia()" :loading="inLoading">鎵归噺涓婁紶</el-button>
+ </div> -->
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ <div class="table">
+ <div
+ style="
+ width: 100%;
+ display: flex;
+ flex-wrap: nowrap;
+ font-size: 13px;
+ flex-direction: row;
+ justify-content: flex-end;
+ align-items: center;
+ "
+ >
+ <p style="margin-left: 15px">
+ 寰呮彁浜ゆ暟閲�: <span
+ style="font-size: 16px; color: rgb(58, 123, 250)"
+ >{{ unSubmitCount }}</span
+ >
+ </p>
+ <p style="margin-left: 15px">
+ 寰呭鏍告暟閲�: <span
+ style="font-size: 16px; color: rgb(58, 123, 250)"
+ >{{ unExamineCount }}</span
+ >
+ </p>
+ <p style="margin-left: 15px">
+ 寰呮壒鍑嗘暟閲�: <span
+ style="font-size: 16px; color: rgb(58, 123, 250)"
+ >{{ unRatifyCount }}</span
+ >
+ </p>
+ </div>
+ <lims-table
+ :tableData="tableData"
+ :column="column"
+ :tableLoading="tableLoading"
+ :height="'calc(100vh - 270px)'"
+ :page="page"
+ @pagination="pagination"
+ ></lims-table>
+ </div>
+ </div>
+ <!--鎶ュ憡鏌ョ湅-->
+ <el-dialog
+ :fullscreen="fullscreen"
+ top="5vh"
+ :modal-append-to-body="false"
+ :visible.sync="viewIssuedVisible"
+ title="鎶ュ憡鏌ョ湅"
+ width="80vw"
+ >
+ <div class="full-screen">
+ <i
+ v-if="!fullscreen"
+ class="el-icon-full-screen"
+ style="cursor: pointer; font-size: 18px"
+ @click="fullscreen = true"
+ ></i>
+ <!-- <img
+ v-else
+ alt=""
+ src="../../../static/img/no-full.svg"
+ style="cursor: pointer"
+ @click="fullscreen = false"
+ /> -->
+ </div>
+ <div v-if="viewIssuedVisible" style="height: 80vh">
+ <onlyoffice
+ ref="onlyoffice"
+ :options="option"
+ style="width: 100%; height: 100%"
+ />
+ </div>
+ </el-dialog>
+ <el-dialog
+ title="鍦ㄧ嚎缂栧埗"
+ :visible.sync="claimVisible"
+ width="22cm"
+ :modal-append-to-body="false"
+ :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="../../../static/img/no-full.svg"
+ alt=""
+ v-else
+ style="cursor: pointer"
+ @click="fullscreen = false"
+ /> -->
+ </div>
+ <Word
+ style="height: 70vh"
+ :class="{ fullscreen: fullscreen }"
+ v-if="claimVisible"
+ ref="Word"
+ :value="value"
+ />
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="claimVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="confirmClaim">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="鎶ュ憡瀹℃牳"
+ top="5vh"
+ :visible.sync="issuedVisible"
+ width="80vw"
+ :modal-append-to-body="false"
+ :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="../../../static/img/no-full.svg"
+ alt=""
+ v-else
+ style="cursor: pointer"
+ @click="fullscreen = false"
+ /> -->
+ </div>
+ <div style="height: 75vh" v-if="issuedVisible">
+ <onlyoffice
+ ref="onlyoffice"
+ :options="option"
+ style="width: 100%; height: 100%"
+ />
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="issuedReasonVisible = true" :disabled="loadingIssued"
+ >涓嶉�氳繃</el-button
+ >
+ <el-button type="primary" @click="subIssued" :loading="loadingIssued"
+ >閫� 杩�</el-button
+ >
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="涓嶉�氳繃鍘熷洜"
+ top="5vh"
+ :visible.sync="issuedReasonVisible"
+ width="400px"
+ :modal-append-to-body="false"
+ >
+ <div class="search_thing">
+ <div class="search_label">涓嶉�氳繃鍘熷洜锛�</div>
+ <div class="search_input">
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="reason"
+ ></el-input>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button
+ @click="issuedReasonVisible = false"
+ :disabled="loadingIssuedReason"
+ >鍙栨秷</el-button
+ >
+ <el-button
+ type="primary"
+ @click="handleIssuedReason"
+ :loading="loadingIssuedReason"
+ >纭畾</el-button
+ >
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="鎶ュ憡鎵瑰噯"
+ top="5vh"
+ :visible.sync="approveVisible"
+ width="80vw"
+ :modal-append-to-body="false"
+ :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="../../../static/img/no-full.svg"
+ alt=""
+ v-else
+ style="cursor: pointer"
+ @click="fullscreen = false"
+ /> -->
+ </div>
+ <div style="height: 75vh" v-if="approveVisible">
+ <onlyoffice
+ ref="onlyoffice"
+ :options="option"
+ style="width: 100%; height: 100%"
+ />
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button
+ @click="approveReasonVisible = true"
+ :disabled="loadingApprove"
+ >涓嶆壒鍑�</el-button
+ >
+ <el-button type="primary" @click="subApprove" :loading="loadingApprove"
+ >鎵� 鍑�</el-button
+ >
+ </span>
+ </el-dialog>
+ <el-dialog
+ title="涓嶆壒鍑嗗師鍥�"
+ :visible.sync="approveReasonVisible"
+ width="400px"
+ :modal-append-to-body="false"
+ >
+ <div class="search_thing">
+ <div class="search_label">涓嶆壒鍑嗗師鍥狅細</div>
+ <div class="search_input">
+ <el-input
+ size="small"
+ placeholder="璇疯緭鍏�"
+ clearable
+ v-model="reason"
+ ></el-input>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button
+ @click="approveReasonVisible = false"
+ :disabled="loadingApproveReason"
+ >鍙栨秷</el-button
+ >
+ <el-button
+ type="primary"
+ @click="handleApproveReason"
+ :loading="loadingApproveReason"
+ >纭畾</el-button
+ >
+ </span>
+ </el-dialog>
+ <el-dialog
+ :visible.sync="batchUploadDia"
+ title="鎶ュ憡鎵归噺涓婁紶"
+ width="30%"
+ :close-on-click-modal="false"
+ top="5vh"
+ >
+ <div>
+ <!-- <el-upload
+ class="upload-demo"
+ :action="action"
+ :headers="headers"
+ :show-file-list="false"
+ accept=".doc,.docx"
+ :limit="1"
+ :before-upload="beforeUpload"
+ :on-success="handleSuccess"
+ ref="upload"
+ :on-error="onError">
+ </el-upload> -->
+ <el-upload
+ ref="upload"
+ class="upload-demo custom-upload"
+ drag
+ show-file-list
+ accept=".doc,.docx"
+ :action="action"
+ :headers="headers"
+ :on-error="onError"
+ :before-upload="beforeUpload"
+ :file-list="fileList"
+ :auto-upload="false"
+ :limit="100"
+ :on-exceed="uploadExceed"
+ :on-success="handleSuccess"
+ multiple
+ >
+ <i class="el-icon-upload"></i>
+ <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
+ <div class="el-upload__tip" slot="tip">
+ 鍙兘涓婁紶.doc/.docx鏂囦欢锛屼笖鍗曚釜鏂囦欢涓嶈秴杩�10MB
+ </div>
+ </el-upload>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button size="small" type="primary" @click="submitUpload"
+ >纭涓婁紶</el-button
+ >
+ </span>
+ </el-dialog>
+ <!-- 鎶ュ憡鎵归噺瀹℃壒寮规 -->
+ <el-dialog
+ :visible.sync="oneClickApprovalDialog"
+ title="鎶ュ憡鎵归噺瀹℃壒"
+ width="40%"
+ :close-on-click-modal="false"
+ top="5vh"
+ >
+ <div>
+ <el-result
+ icon="error"
+ v-show="progressData.hasException != null"
+ title="閿欒淇℃伅"
+ :subTitle="progressData.hasException"
+ ></el-result>
+ <el-result
+ icon="success"
+ v-show="isSuccess && progressData.hasException == null"
+ title="鎴愬姛淇℃伅"
+ subTitle="鎶ュ憡瀹℃壒瀹屾垚"
+ ></el-result>
+ <el-progress
+ :percentage="progressData.hasNum"
+ :color="customColors"
+ ></el-progress>
+ <el-statistic title="鍓╀綑鎶ュ憡鏁伴噺">
+ <template slot="formatter">
+ {{ progressData.surplus }}/{{ progressData.hasCount }}
+ </template>
+ </el-statistic>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <!-- <el-button size="small" type="primary" @click="confirmApproval"
+ >纭</el-button
+ > -->
+ </span>
+ </el-dialog>
+ <!-- 鎾ゅ洖寮规 -->
+ <el-dialog
+ title="璇烽�夋嫨闇�瑕佹挙鍥炵殑璇曢獙瀹�"
+ :visible.sync="withdrawDialogVisible"
+ width="30%"
+ :before-close="handleClose"
+ >
+ <el-select
+ v-model="laboratory"
+ multiple
+ clearable
+ style="width: 100%; margin-bottom: 20px"
+ placeholder="璇烽�夋嫨璇曢獙瀹�"
+ >
+ <el-option
+ v-for="(item, i) in laboratorys"
+ :key="i"
+ :label="item.label"
+ :value="item.value"
+ ></el-option>
+ </el-select>
+
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="handleClose">鍙� 娑�</el-button>
+ <el-button type="primary" @click="withdrawOperation">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+
+ <!-- 瀹℃壒绛惧悕閰嶇疆寮规 -->
+ <el-dialog
+ :visible.sync="approvalConfigDialog"
+ title="瀹℃壒绛惧悕閰嶇疆"
+ width="55%"
+ :close-on-click-modal="false"
+ top="5vh"
+ >
+ <div v-if="approvalConfigListTX.editor != null">
+ <el-divider content-position="left">閫氫俊浜у搧瀹為獙瀹�</el-divider>
+ <el-form
+ size="mini"
+ :model="approvalConfigListTX"
+ inline
+ label-position="right"
+ >
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="缂栧埗浜�:" prop="editor">
+ <el-select
+ v-model="approvalConfigListTX.editor"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="瀹℃牳浜�:" prop="examiner">
+ <el-select
+ v-model="approvalConfigListTX.examiner"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎵瑰噯浜�:" prop="approver">
+ <el-select
+ v-model="approvalConfigListTX.approver"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ </div>
+ <br />
+ <div v-if="approvalConfigListDL.editor != null">
+ <el-divider content-position="left">鐢靛姏浜у搧瀹為獙瀹�</el-divider>
+ <el-form
+ size="mini"
+ :model="approvalConfigListDL"
+ inline
+ label-position="right"
+ >
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="缂栧埗浜�:" prop="editor">
+ <el-select
+ v-model="approvalConfigListDL.editor"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="瀹℃牳浜�:" prop="examiner">
+ <el-select
+ v-model="approvalConfigListDL.examiner"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎵瑰噯浜�:" prop="approver">
+ <el-select
+ v-model="approvalConfigListDL.approver"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ filterable
+ >
+ <el-option-group
+ v-for="(item, index) in Object.keys(personList)"
+ :key="index"
+ :label="item"
+ >
+ <el-option
+ v-for="op in personList[item]"
+ :key="op.id"
+ :label="op.name"
+ :value="op.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button size="small" type="primary" @click="confirmApprovalConfig"
+ >纭</el-button
+ >
+ </span>
+ </el-dialog>
+ </div>
</template>
<script>
-export default {};
-</script>
+import limsTable from "@/components/Table/lims-table.vue";
+import onlyoffice from "../reportPreparation/onlyoffice.vue";
+import {
+ pageInsReport,
+ inReport,
+ upAll,
+ getLaboratoryByReportId,
+ withdraw,
+ updateApproveConfig,
+ getUserList,
+ getApproveConfigList,
+ downAll,
+ getBatchApprovalProgress,
+ getReportCountInfo,
+ downReport,
+ upReportUrl,
+ ratifyReport,
+ writeReport,
+ examineReport,
+ downLoad,
+ getReportInfo,
+} from "../../../api/business/reportPreparation";
-<style></style>
+export default {
+ components: {
+ limsTable,
+ onlyoffice,
+ },
+ data() {
+ return {
+ tagField: {
+ isUpload: {
+ select: [
+ {
+ value: 0,
+ type: "danger",
+ label: "鏈笂浼�",
+ },
+ {
+ value: 1,
+ type: "success",
+ label: "宸蹭笂浼�",
+ },
+ ],
+ },
+ isRatify: {
+ select: [
+ {
+ value: -9,
+ type: "info",
+ label: "鏈壒鍑�",
+ },
+ {
+ value: 0,
+ type: "danger",
+ label: "涓嶆壒鍑�",
+ },
+ {
+ value: 1,
+ type: "success",
+ label: "鎵瑰噯",
+ },
+ ],
+ },
+ isExamine: {
+ select: [
+ {
+ value: -9,
+ type: "info",
+ label: "鏈鏍�",
+ },
+ {
+ value: 0,
+ type: "danger",
+ label: "涓嶉�氳繃",
+ },
+ {
+ value: 1,
+ type: "success",
+ label: "閫氳繃",
+ },
+ ],
+ },
+ state: {
+ select: [
+ {
+ value: 0,
+ type: "danger",
+ label: "寰呮彁浜�",
+ },
+ {
+ value: 1,
+ type: "success",
+ label: "宸叉彁浜�",
+ },
+ ],
+ },
+ },
+ entity: {
+ isUpload: null,
+ entrustCode: null,
+ state: null,
+ isExamine: null,
+ isRatify: null,
+ code: null,
+ createTimeRange: [],
+ },
+ withdrawDialogVisible: false,
+ laboratory: [],
+ laboratorys: [],
+ isSuccess: false,
+ time: null,
+ //瀹℃壒杩涘害瀵硅薄
+ progressData: {
+ hasProgress: false,
+ hasNum: 0,
+ hasCount: 0,
+ hasException: null,
+ surplus: 0,
+ },
+ personList: [],
+ approvalConfigListTX: {
+ editor: null,
+ examiner: null,
+ approver: null,
+ }, //瀹℃壒绛惧悕閰嶇疆鍒楄〃
+ approvalConfigListDL: {
+ editor: null,
+ examiner: null,
+ approver: null,
+ }, //瀹℃壒绛惧悕閰嶇疆鍒楄〃
+ approvalConfigDialog: false,
+ approvalConfigLoading: false,
+ surplusReportNum: 0,
+ percentage: 0,
+ customColors: [
+ { color: "#f56c6c", percentage: 20 },
+ { color: "#e6a23c", percentage: 40 },
+ { color: "#5cb87a", percentage: 60 },
+ { color: "#1989fa", percentage: 80 },
+ { color: "#6f7ad3", percentage: 100 },
+ ],
+ oneClickApprovalDialog: false,
+ approvalLoading: false,
+ isShowMore: false,
+ more: false,
+ fileList: [],
+ batchUploadDia: false,
+ viewIssuedVisible: false,
+ tableData: [],
+ column: [
+ {
+ label: "鎶ュ憡缂栧彿",
+ prop: "code",
+ },
+ {
+ label: "涓婁紶鐘舵��",
+ prop: "isUpload",
+ dataType: "tag",
+ formatData: (params) => {
+ return params == 1 ? "宸蹭笂浼�" : "鏈笂浼�";
+ },
+ formatType: (params) => {
+ return params == 1 ? "success" : "danger";
+ },
+ },
+ {
+ label: "鍒涘缓鏃堕棿",
+ prop: "createTime",
+ },
+ {
+ label: "鎻愪氦浜�",
+ prop: "writeUserName",
+ },
+ {
+ label: "鎻愪氦鐘舵��",
+ prop: "state",
+ dataType: "tag",
+ formatData: (params) => {
+ return params == 1 ? "宸叉彁浜�" : "寰呮彁浜�";
+ },
+ formatType: (params) => {
+ return params == 1 ? "success" : "danger";
+ },
+ },
+ {
+ label: "鎻愪氦鏃堕棿",
+ prop: "writeTime",
+ },
+ {
+ label: "瀹℃牳浜�",
+ prop: "examineUser",
+ },
+ {
+ label: "瀹℃牳鐘舵��",
+ prop: "isExamine",
+ dataType: "tag",
+ formatData: (params) => {
+ let farmat = "";
+ if (params == 0) {
+ farmat = "涓嶉�氳繃";
+ } else if (params == 1) {
+ farmat = "閫氳繃";
+ } else {
+ farmat = "鏈鏍�";
+ }
+ return farmat;
+ },
+ formatType: (params) => {
+ let farmat = "";
+ if (params == 0) {
+ farmat = "danger";
+ } else if (params == 1) {
+ farmat = "success";
+ } else {
+ farmat = "info";
+ }
+ return farmat;
+ },
+ },
+ {
+ label: "瀹℃牳澶囨敞",
+ prop: "examineTell",
+ },
+ {
+ label: "瀹℃牳鏃堕棿",
+ prop: "examineTime",
+ },
+ {
+ label: "鎵瑰噯浜�",
+ prop: "ratifyUser",
+ },
+ {
+ label: "鎵瑰噯鐘舵��",
+ prop: "isRatify",
+ dataType: "tag",
+ formatData: (params) => {
+ let farmat = "";
+ if (params == 0) {
+ farmat = "涓嶆壒鍑�";
+ } else if (params == 1) {
+ farmat = "鎵瑰噯";
+ } else {
+ farmat = "鏈壒鍑�";
+ }
+ return farmat;
+ },
+ formatType: (params) => {
+ let farmat = "";
+ if (params == 0) {
+ farmat = "danger";
+ } else if (params == 1) {
+ farmat = "sucess";
+ } else {
+ farmat = "info";
+ }
+ return farmat;
+ },
+ },
+ {
+ label: "鎵瑰噯澶囨敞",
+ prop: "ratifyTell",
+ },
+ {
+ label: "鎵瑰噯鏃堕棿",
+ prop: "ratifyTime",
+ },
+ {
+ dataType: "action",
+ fixed: "right",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "缂栧埗",
+ type: "text",
+ clickFun: (row) => {
+ this.handleWeave(row);
+ },
+ disabled: (row) => {
+ return row.isExamine != -9;
+ },
+ },
+ {
+ name: "涓嬭浇",
+ type: "text",
+ clickFun: (row) => {
+ this.download(row);
+ },
+ },
+ {
+ name: "涓婁紶",
+ type: "upload",
+ url: "/file/attachmentType/upload",
+ data: (row) => {
+ return {
+ id: row.id,
+ type: 1,
+ };
+ },
+ uploadIdFun: (row) => {
+ return row.id;
+ },
+ disabled: (row) => {
+ return row.isExamine != -9;
+ },
+ },
+ {
+ name: "杩樺師",
+ type: "text",
+ clickFun: (row) => {
+ this.handleRestore(row);
+ },
+ disabled: (row) => {
+ return row.isExamine != -9;
+ },
+ },
+ {
+ name: "鎻愪氦",
+ type: "text",
+ clickFun: (row) => {
+ this.handleSubmit(row);
+ },
+ disabled: (row) => {
+ return row.state != 0;
+ },
+ },
+ {
+ name: "瀹℃牳",
+ type: "text",
+ clickFun: (row) => {
+ this.handleIssued(row);
+ },
+ disabled: (row) => {
+ return (
+ row.state == null || row.state == 0 || row.isExamine == 1
+ );
+ },
+ },
+ {
+ name: "鎵瑰噯",
+ type: "text",
+ clickFun: (row) => {
+ this.handleApprove(row);
+ },
+ disabled: (row) => {
+ return (
+ row.state == null ||
+ row.state == 0 ||
+ row.isExamine == 0 ||
+ row.isExamine == -9 ||
+ row.isRatify == 1
+ );
+ },
+ },
+ {
+ name: "鎾ゅ洖",
+ type: "text",
+ clickFun: (row) => {
+ this.withdraw(row);
+ },
+ disabled: (row) => {
+ return row.state == 1;
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 1,
+ },
+ tableLoading: false,
+ entityCopy: {},
+ upIndex: 0,
+ statusList: [],
+ claimVisible: false,
+ issuedVisible: false,
+ issuedReasonVisible: false,
+ approveVisible: false,
+ approveReasonVisible: false,
+ fullscreen: false,
+ loadingApproveReason: false,
+ loadingApprove: false,
+ loadingIssuedReason: false,
+ loadingIssued: false,
+ value: ``,
+ reason: "",
+ currentInfo: null,
+ option: null,
+ mutiList: [],
+ outLoading: false,
+ inLoading: false,
+ maxNum: 1,
+ unSubmitCount: 0,
+ unRatifyCount: 0,
+ unExamineCount: 0,
+ };
+ },
+ computed: {
+ headers() {
+ return {
+ token: sessionStorage.getItem("token"),
+ };
+ },
+ action() {
+ return "";
+ },
+ },
+ created() {
+ this.getAuthorizedPerson();
+ this.handleResize();
+ // 鐩戝惉绐楀彛澶у皬鏀瑰彉浜嬩欢
+ window.addEventListener("resize", this.handleResize);
+ },
+ beforeDestroy() {
+ if (this.time != null) {
+ clearInterval(this.time);
+ this.time = null;
+ }
+ this.progressData = {
+ hasProgress: false,
+ hasNum: 0,
+ hasCount: 0,
+ hasException: null,
+ surplus: 0,
+ };
+ window.removeEventListener("resize", this.handleResize);
+ },
+ mounted() {
+ this.entityCopy = this.HaveJson(this.entity);
+ this.getList();
+ this.getReportCountInfo();
+ },
+ watch: {
+ batchUploadDia(newVal) {
+ if (!newVal) {
+ this.$refs.upload.clearFiles();
+ this.fileList = [];
+ }
+ },
+ progressData(newVal) {
+ if (newVal && newVal.hasNum == 100) {
+ clearInterval(this.time);
+ this.$message.success("鎶ュ憡瀹℃壒瀹屾垚");
+ this.isSuccess = true;
+ this.mutiList = [];
+ this.refresh();
+ } else if (
+ newVal &&
+ newVal.hasException != null &&
+ newVal.hasException != ""
+ ) {
+ clearInterval(this.time);
+ }
+ },
+ oneClickApprovalDialog(newVal) {
+ if (!newVal) {
+ this.isSuccess = false;
+ this.progressData = {
+ hasProgress: false,
+ hasNum: 0,
+ hasCount: 0,
+ hasException: null,
+ surplus: 0,
+ };
+ }
+ },
+ },
+ methods: {
+ // 杩斿洖鍒嗛〉鍊�
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ getList() {
+ this.tableLoading = true;
+ if (!this.entity.createTimeRange) {
+ this.entity.createTimeRange = [];
+ }
+ const data = { ...this.page, ...this.entity };
+ pageInsReport(data)
+ .then((res) => {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ this.tableLoading = false;
+ })
+ .catch((error) => {
+ console.error(error);
+ this.tableLoading = false;
+ });
+ },
+ // 鎾ゅ洖 寮规
+ withdraw(row) {
+ getLaboratoryByReportId(row.id).then((res) => {
+ this.laboratorys = res.data;
+ this.reportId = row.id;
+ this.withdrawDialogVisible = true;
+ });
+ },
+ withdrawOperation() {
+ if (this.laboratory.length == 0) {
+ this.$message.error("璇烽�夋嫨闇�瑕佹挙鍥炵殑璇曢獙瀹�");
+ return;
+ }
+ let data = {
+ laboratory: JSON.stringify(this.laboratory),
+ id: this.reportId,
+ };
+ withdraw(data).then((res) => {
+ if (res.code == 200) {
+ this.$message.success("鎾ゅ洖鎴愬姛");
+ this.withdrawDialogVisible = false;
+ this.refresh();
+ }
+ });
+ },
+
+ handleCommand(command) {
+ switch (command) {
+ case "batchDownload":
+ //鎵归噺涓嬭浇
+ this.handleDowns();
+ break;
+ case "batchUpload":
+ //鎵归噺涓婁紶
+ this.openBatchUploadDia();
+ break;
+ case "oneClickApproval":
+ //涓�閿鎵�
+ this.oneClickApproval();
+ break;
+ case "approvalConfig":
+ //瀹℃壒绛惧悕閰嶇疆
+ this.openApprovalConfig();
+ break;
+ }
+ },
+ //纭鏇存柊瀹℃壒绛惧悕閰嶇疆
+ confirmApprovalConfig() {
+ let data = [];
+ if (this.approvalConfigListTX.id) {
+ data.push(this.approvalConfigListTX);
+ }
+ if (this.approvalConfigListDL.id) {
+ data.push(this.approvalConfigListDL);
+ }
+ updateApproveConfig({ configList: data })
+ .then((res) => {
+ if (res.code == 200) {
+ this.$message.success("鏇存柊鎴愬姛");
+ this.approvalConfigDialog = false;
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ //鑾峰彇浜哄憳淇℃伅
+ getAuthorizedPerson() {
+ getUserList()
+ .then((res) => {
+ this.personList = res.data;
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ //鎵撳紑瀹℃壒绛惧悕閰嶇疆寮规
+ openApprovalConfig() {
+ getApproveConfigList()
+ .then((res) => {
+ if (res.code !== 201) {
+ res.data.forEach((ele) => {
+ if (ele.laboratory == "閫氫俊浜у搧瀹為獙瀹�") {
+ this.approvalConfigListTX = { ...ele };
+ }
+ if (ele.laboratory == "鐢靛姏浜у搧瀹為獙瀹�") {
+ this.approvalConfigListDL = { ...ele };
+ }
+ });
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ this.$nextTick(() => {
+ this.approvalConfigDialog = true;
+ });
+ },
+ //纭瀹℃壒
+ confirmApproval() {},
+ //涓�閿鎵规寜閽�
+ oneClickApproval() {
+ if (this.mutiList.length == 0) {
+ this.$message.error("璇烽�夋嫨瑕佸鎵圭殑鎶ュ憡");
+ return;
+ }
+ //鎵ц瀹℃壒
+ if (!this.progressData.hasProgress) {
+ //鏈鎵圭殑鎶ュ憡
+ let unApprovalList = this.mutiList.filter(
+ (ele) => ele.isExamine == -9 || ele.isRatify == -9
+ );
+ let entity = this.entity;
+ //鏍规嵁鏌ヨ鏉′欢杩囨护宸查�夋嫨鐨勬暟鎹�
+ let ids = unApprovalList
+ .filter((f) =>
+ entity.isExamine != null && entity.isExamine !== ""
+ ? f.isExamine === entity.isExamine
+ : true
+ )
+ .filter((f) =>
+ entity.isRatify != null && entity.isRatify !== ""
+ ? f.isRatify === entity.isRatify
+ : true
+ )
+ .filter((f) =>
+ entity.isUpload != null && entity.isUpload !== ""
+ ? f.isUpload === entity.isUpload
+ : true
+ )
+ .filter((f) =>
+ entity.code != null && entity.code !== ""
+ ? f.code.indexOf(entity.code) >= 0
+ : true
+ )
+ .filter((f) =>
+ entity.state != null && entity.state !== ""
+ ? f.state === entity.state
+ : true
+ )
+ .map((ele) => ele.id);
+ batchApprovalReport({ ids: ids })
+ .then((res) => {
+ if (res.code != 201) {
+ //鏌ヨ瀹℃壒杩涘害
+ this.time = setInterval(() => {
+ this.getProgress();
+ }, 500);
+ }
+ })
+ .catch((error) => {
+ console.error(error);
+ clearInterval(this.time);
+ });
+ }
+ // this.getProgress();
+ this.$nextTick(() => {
+ this.oneClickApprovalDialog = true;
+ });
+ },
+ getProgress() {
+ getBatchApprovalProgress().then((res) => {
+ this.progressData = res.data;
+ });
+ },
+ // 瀹氫箟涓�涓嚱鏁版潵澶勭悊瑙嗗彛瀹藉害鍙樺寲
+ handleResize() {
+ //瑙嗗彛瀹藉害
+ let windowWidth = window.innerWidth;
+ //鍑忓幓宸﹁竟鑿滃崟鏍忓搴�92锛岄〉杈硅窛40,鍙宠竟鐨勬搷浣滄寜閽搴iewportWidth*33.33333%
+ let viewportWidth = windowWidth - 92 - 40;
+ //鎼滅储琛ㄥ崟鏈�澶у搴�
+ let formMaxWidth = viewportWidth - viewportWidth * 0.3333333;
+ //鍗曚釜鎼滅储妗嗗搴︿负230
+ this.maxNum = formMaxWidth / 230;
+ },
+ //鎵归噺涓婁紶鎶ュ憡
+ openBatchUploadDia() {
+ this.batchUploadDia = true;
+ },
+ // 鏌ョ湅鎶ュ憡
+ viewIssued(row) {
+ this.currentInfo = row;
+ console.log(`output->row`, row);
+ let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS;
+ let fileType = "docx";
+ if (row.tempUrlPdf != null || row.tempUrlPdf === "") {
+ fileName = row.tempUrlPdf;
+ fileType = "pdf";
+ }
+ fileName = fileName.replace("/word/", "");
+ const userName = JSON.parse(localStorage.getItem("user")).name;
+ 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,
+ };
+ console.log(this.javaApi + "/word/" + fileName);
+ this.viewIssuedVisible = true;
+ },
+ handleChange(arr) {
+ this.mutiList = arr;
+ },
+ handleDowns() {
+ if (this.mutiList.length == 0) {
+ this.$message.error("璇烽�夋嫨鎶ュ憡");
+ return;
+ }
+ let entity = this.entity;
+ //鏍规嵁鏌ヨ鏉′欢杩囨护宸查�夋嫨鐨勬暟鎹�
+ let str = this.mutiList
+ .filter((f) =>
+ entity.isExamine != null && entity.isExamine !== ""
+ ? f.isExamine === entity.isExamine
+ : true
+ )
+ .filter((f) =>
+ entity.isRatify != null && entity.isRatify !== ""
+ ? f.isRatify === entity.isRatify
+ : true
+ )
+ .filter((f) =>
+ entity.isUpload != null && entity.isUpload !== ""
+ ? f.isUpload === entity.isUpload
+ : true
+ )
+ .filter((f) =>
+ entity.code != null && entity.code !== ""
+ ? f.code.indexOf(entity.code) >= 0
+ : true
+ )
+ .filter((f) =>
+ entity.state != null && entity.state !== ""
+ ? f.state === entity.state
+ : true
+ )
+ .map((m) => m.id)
+ .join(",");
+ if (str === "" || str == null) {
+ this.$message.error("娌℃湁绗﹀悎鏉′欢鐨勬暟鎹�!");
+ return;
+ }
+ this.outLoading = true;
+ downAll({ ids: str }).then((res) => {
+ this.outLoading = false;
+ this.$message.success("瀵煎嚭鎴愬姛");
+ // const blob = new Blob([res],{ type: 'application/octet-stream' });
+ // const url = URL.createObjectURL(blob);
+ // const link = document.createElement('a');
+ // link.href = url;
+ // link.download = '鎶ュ憡.zip';
+ // link.click();
+ const link = document.createElement("a");
+ link.href = this.javaApi + res.message;
+ link.target = "_blank";
+ document.body.appendChild(link);
+ link.click();
+ //涓嬭浇瀹屾垚锛岄噸缃〃鏍�
+ this.$nextTick(() => {
+ this.refresh();
+ });
+ });
+ },
+ uploadExceed(file, fileList) {
+ this.$message.error("鍚屾椂涓婁紶鏂囦欢鏁扮洰鏈�澶т负100锛岃閲嶈瘯");
+ },
+ submitUpload() {
+ this.$refs.upload.submit();
+ },
+ beforeUpload(file) {
+ const docxType = [
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ "application/msword",
+ ];
+ if (!docxType.includes(file.type)) {
+ this.$message.error("鍙兘涓婁紶绫诲瀷涓�.doc/.docx鐨勬枃浠�");
+ return false;
+ }
+ const maxSize = 10 * 1024 * 1024; //鍗曚釜鏂囦欢鏈�澶т笂浼犲ぇ灏�10MB
+ if (file.size > maxSize) {
+ this.$message.error("鏂囦欢" + file.name + "澶у皬瓒呰繃10MB");
+ return false;
+ }
+ return true;
+ // const isZip = file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' || file.name.endsWith('.zip');
+ // if (!isZip) {
+ // this.$message.error('涓婁紶鏂囦欢鍙兘鏄� ZIP 鏍煎紡!');
+ // }
+ // if(isZip){
+ // this.inLoading = true;
+ // }
+ // return isZip;
+ },
+ handleSuccess(response) {
+ this.inLoading = false;
+ if (response.code == 200) {
+ this.$message.success("瀵煎叆鎴愬姛");
+ this.refreshTable();
+ this.$refs.upload.clearFiles();
+ this.fileList = [];
+ } else {
+ this.$message.error(response.message);
+ }
+ },
+ onError(err, file, fileList, type) {
+ this.$message.error("涓婁紶澶辫触");
+ this.$refs.upload.clearFiles();
+ this.fileList = [];
+ },
+ refreshTable(e) {
+ if (!this.entity.createTimeRange) {
+ this.entity.createTimeRange = [];
+ }
+ this.getList();
+ this.getReportCountInfo();
+ },
+ getReportCountInfo() {
+ if (!this.entity.createTimeRange) {
+ this.entity.createTimeRange = [];
+ }
+ console.log("entity", this.entity);
+ getReportCountInfo(this.entity)
+ .then((res) => {
+ this.unSubmitCount = res.data.unSubmitCount;
+ this.unRatifyCount = res.data.unRatifyCount;
+ this.unExamineCount = res.data.unExamineCount;
+ })
+ .catch((error) => {
+ console.error(error);
+ });
+ },
+ refresh() {
+ this.entity = this.HaveJson(this.entityCopy);
+ this.upIndex++;
+ this.mutiList = [];
+ this.getReportCountInfo();
+ },
+ async handleWeave(row) {
+ let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS;
+ fileName = fileName.replace("/word/", "");
+ const userName = this.$store.state.user.name;
+ //鍙傝�僾abOnlyOffice缁勪欢鍙傛暟閰嶇疆
+ const { href } = this.$router.resolve({
+ path: `/wordEdit`,
+ query: {
+ url: this.javaApi + "/word/" + fileName,
+ isEdit: true,
+ fileType: "docx",
+ title: fileName,
+ lang: "zh-CN",
+ isPrint: true,
+ user_id: 1,
+ user_name: userName,
+ editUrl:
+ this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName,
+ },
+ });
+ window.open(href, "_blank");
+ },
+ confirmClaim() {
+ // console.log(this.$refs.Word.getValue())
+ },
+ async selectAllByOne(row) {
+ const userName = JSON.parse(localStorage.getItem("user")).name;
+ //鍙傝�僾abOnlyOffice缁勪欢鍙傛暟閰嶇疆
+ const { href } = this.$router.resolve({
+ path: `/wordEdit`,
+ query: {
+ url: this.javaApi + "/word/" + row.entrustCode + ".docx",
+ isEdit: "false",
+ fileType: "docx",
+ title: row.entrustCode + ".docx",
+ lang: "zh-CN",
+ isPrint: true,
+ user_id: 1,
+ user_name: userName,
+ },
+ });
+ window.open(href, "_blank");
+ console.log(`output->row`, row);
+ },
+ download(row) {
+ getReportInfo({ id: row.id, type: 1,suffix:'.docx' }).then((response) => {
+ if (response.data && response.data.contentType) {
+ downLoad({ id: row.id, type: 1, code: row.code,suffix: '.docx' })
+ .then((res) => {
+ // 鑾峰彇鏂囦欢鍚�
+ const blob = new Blob([res], { type: response.data.contentType });
+ const url = URL.createObjectURL(blob);
+ let link = document.createElement("a");
+ link.href = url;
+ link.download = row.code;
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ URL.revokeObjectURL(url);
+ })
+ .catch((error) => {
+ this.$message.error(error);
+ });
+ } else {
+ this.$message.error("鏈壘鍒版枃浠�");
+ }
+ });
+ },
+ // 杩樺師鎿嶄綔
+ handleRestore(row) {
+ this.$confirm("鏄惁杩樺師褰撳墠鎶ュ憡?", "杩樺師", {
+ confirmButtonText: "杩樺師",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ upReportUrl({ id: row.id,type:1 }).then((res) => {
+ if (res.code === 200) {
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.refreshTable("page");
+ }
+ });
+ })
+ .catch({}());
+ },
+ handleIssued(row) {
+ this.currentInfo = row;
+ let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS;
+ fileName = fileName.replace("/word/", "");
+ const userName = JSON.parse(localStorage.getItem("user")).name;
+ this.option = {
+ url: this.javaApi + "/word/" + fileName,
+ isEdit: false,
+ fileType: "docx",
+ title: fileName,
+ lang: "zh-CN",
+ isPrint: false,
+ user_id: 1,
+ user_name: userName,
+ editUrl:
+ this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName,
+ };
+ this.issuedVisible = true;
+ },
+ // 瀹℃牳閫氳繃
+ subIssued() {
+ this.loadingIssued = true;
+ examineReport({ id: this.currentInfo.id, isExamine: 1 })
+ .then((res) => {
+ this.loadingIssued = false;
+ if (res.code === 201) {
+ return;
+ }
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.refreshTable("page");
+ this.currentInfo = null;
+ this.issuedVisible = false;
+ })
+ .catch((e) => {
+ this.$message.error("鎻愪氦澶辫触");
+ this.loadingIssued = false;
+ });
+ },
+ handleApprove(row) {
+ this.currentInfo = row;
+ let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS;
+ fileName = fileName.replace("/word/", "");
+ const userName = JSON.parse(localStorage.getItem("user")).name;
+ this.option = {
+ url: this.javaApi + "/word/" + fileName,
+ isEdit: false,
+ fileType: "docx",
+ title: fileName,
+ lang: "zh-CN",
+ isPrint: false,
+ user_id: 1,
+ user_name: userName,
+ editUrl:
+ this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName,
+ };
+ this.approveVisible = true;
+ },
+ // 鎵瑰噯閫氳繃
+ subApprove() {
+ this.loadingApprove = true;
+ ratifyReport({ id: this.currentInfo.id, isRatify: 1 }).then((res) => {
+ this.loadingApprove = false;
+ if (res.code == 201) {
+ this.$message.error("鎵瑰噯澶辫触");
+ return;
+ }
+ this.$message.success("宸叉壒鍑�");
+ this.refreshTable("page");
+ this.currentInfo = null;
+ this.approveVisible = false;
+ });
+ },
+ // 鎻愪氦鎿嶄綔
+ handleSubmit(row) {
+ this.$confirm("鏄惁鎻愪氦褰撳墠鎶ュ憡?", "鎻愪氦", {
+ confirmButtonText: "鎻愪氦",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ writeReport({ id: row.id })
+ .then((res) => {
+ if (res.code === 201) {
+ return;
+ }
+ this.$message.success("鎻愪氦鎴愬姛");
+ this.refreshTable("page");
+ })
+ .catch((e) => {
+ this.$message.error("鎻愪氦澶辫触");
+ });
+ })
+ .catch(() => {});
+ },
+ // 瀹℃牳涓嶉�氳繃鍘熷洜鎻愪氦
+ handleIssuedReason() {
+ if (!this.reason) {
+ return this.$message.error("璇疯緭鍏ュ師鍥�");
+ }
+ this.loadingIssuedReason = true;
+ examineReport({
+ id: this.currentInfo.id,
+ isExamine: 0,
+ examineTell: this.reason,
+ })
+ .then((res) => {
+ this.loadingIssuedReason = false;
+ if (res.code === 201) {
+ return;
+ }
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.refreshTable("page");
+ this.currentInfo = null;
+ this.reason = "";
+ this.issuedVisible = false;
+ this.issuedReasonVisible = false;
+ })
+ .catch((e) => {
+ this.$message.error("鎿嶄綔澶辫触");
+ this.loadingIssuedReason = false;
+ });
+ },
+ // 涓嶆壒鍑嗗師鍥犳彁浜�
+ handleApproveReason() {
+ if (!this.reason) {
+ return this.$message.error("璇疯緭鍏ュ師鍥�");
+ }
+ this.loadingApproveReason = true;
+ examineReport({
+ id: this.currentInfo.id,
+ isRatify: 0,
+ ratifyTell: this.reason,
+ })
+ .then((res) => {
+ this.loadingApproveReason = false;
+ if (res.code === 201) {
+ return;
+ }
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.refreshTable("page");
+ this.currentInfo = null;
+ this.reason = "";
+ this.issuedVisible = false;
+ this.issuedReasonVisible = false;
+ })
+ .catch((e) => {
+ this.$message.error("鎿嶄綔澶辫触");
+ this.loadingIssuedReason = false;
+ });
+ },
+ handleClose() {
+ this.withdrawDialogVisible = false;
+ this.laboratory = [];
+ },
+ getStyle() {
+ return "height: calc(100% - " + (this.more ? "94" : "44") + "px)";
+ },
+ },
+};
+</script>
--
Gitblit v1.9.3