From 749f897a11e711199c6b1677accf2f6e46895315 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期六, 22 十一月 2025 16:01:26 +0800
Subject: [PATCH] 新增了代码
---
src/views/archiveManager/index.vue | 1887 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 1,793 insertions(+), 94 deletions(-)
diff --git a/src/views/archiveManager/index.vue b/src/views/archiveManager/index.vue
index cbd0c09..443ddbf 100644
--- a/src/views/archiveManager/index.vue
+++ b/src/views/archiveManager/index.vue
@@ -17,6 +17,64 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
+ <el-form-item label="绫诲埆鍙�" prop="categoryNumber">
+ <el-row :gutter="8">
+ <el-col :span="6">
+ <el-select
+ v-model="queryParams.categoryType"
+ placeholder="閫夋嫨绫诲埆绫诲瀷"
+ clearable
+ @change="handleQuery"
+ >
+ <el-option
+ v-for="item in recordTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-col>
+ <el-col :span="6">
+ <el-select
+ v-model="queryParams.categoryZone"
+ placeholder="閫夋嫨鍦板尯"
+ clearable
+ @change="handleQuery"
+ >
+ <el-option
+ v-for="item in zoneTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-col>
+ <el-col :span="4">
+ <el-input
+ v-model="queryParams.categoryYear"
+ placeholder="骞翠唤"
+ clearable
+ @keyup.enter.native="handleQuery"
+ />
+ </el-col>
+ <el-col :span="4">
+ <el-input
+ v-model="queryParams.categorySeq"
+ placeholder="寮�濮嬪簭鍙�"
+ clearable
+ @keyup.enter.native="handleQuery"
+ />
+ </el-col>
+ <el-col :span="4">
+ <el-input
+ v-model="queryParams.categorySeqEnd"
+ placeholder="缁撴潫搴忓彿"
+ clearable
+ @keyup.enter.native="handleQuery"
+ />
+ </el-col>
+ </el-row>
+ </el-form-item>
<el-form-item label="妗堝嵎棰樺悕" prop="caseTitle">
<el-input
v-model="queryParams.caseTitle"
@@ -70,12 +128,21 @@
</el-select>
</el-form-item>
<el-form-item label="瀵嗙骇" prop="securityClassification">
- <el-input
+
+
+ <el-select
v-model="queryParams.securityClassification"
- placeholder="璇疯緭鍏ュ瘑绾�"
+ placeholder="璇烽�夋嫨瀵嗙骇"
clearable
- @keyup.enter.native="handleQuery"
- />
+ >
+ <el-option
+ v-for="item in securityLevelOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+
</el-form-item>
<el-form-item label="妗堝嵎椤垫暟" prop="pageCount">
<el-input
@@ -116,6 +183,21 @@
clearable
@keyup.enter.native="handleQuery"
/>
+ </el-form-item>
+ <!-- 娣诲姞椤圭洰鍚嶇О鎼滅储妗� -->
+ <el-form-item label="椤圭洰鍚嶇О" prop="everyProjectName">
+ <el-select
+ v-model="queryParams.everyProjectName"
+ placeholder="璇烽�夋嫨椤圭洰鍚嶇О"
+ clearable
+ >
+ <el-option
+ v-for="item in projectOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
</el-form-item>
<el-form-item label="椤圭洰缂栧彿" prop="projectNumber">
<el-input
@@ -206,15 +288,141 @@
v-hasPermi="['system:records:export']"
>瀵煎嚭</el-button>
</el-col>
+
+ <el-col :span="1.5">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="mini"
+ @click="handleBatchSubmit"
+ v-hasPermi="['system:records:export']"
+ >鎵归噺鎻愪氦</el-button>
+ </el-col>
+
+ <el-col v-if="userId==1" :span="1.5">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="mini"
+ @click="handleExportTemplate"
+ v-hasPermi="['system:materials:edit']"
+ >瀵煎叆妯℃澘涓嬭浇</el-button>
+ </el-col>
+ <el-col v-if="userId!=1" :span="1.5">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="mini"
+ @click="handleExportTemplateOther"
+ v-hasPermi="['system:materials:edit']"
+ >瀵煎叆妯℃澘涓嬭浇</el-button>
+ </el-col>
+ <el-col :span="1.5">
+
+ <el-upload
+ action=""
+
+ class="upload-demo"
+ :show-file-list="false"
+ :http-request="handleImportData"
+ accept=".xlsx,.xls"
+
+ >
+ <el-button size="mini" type="primary"
+ plain
+ icon="el-icon-top">瀵煎叆</el-button>
+
+ </el-upload>
+ </el-col>
+
+
+
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="recordsList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
+
+
+
+ <el-table-column label="鎿嶄綔" align="center" width="190" class-name="small-padding fixed-width">
+ <template slot-scope="scope">
+ <el-button
+ v-if="scope.row.ownData"
+
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="handleInfo(scope.row)"
+ v-hasPermi="['system:records:edit']"
+ >缂栬緫鍗峰唴鐩綍</el-button>
+
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="handleCheck(scope.row)"
+ >鏌ョ湅</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-printer"
+ @click="viewAndPrintExcel(scope.row)"
+ title="鏌ョ湅骞舵墦鍗癊xcel鏂囦欢"
+ >鎵撳嵃棰勬暣鐞嗘竻鍗�</el-button>
+ <el-button
+ v-if="userId!==1&&scope.row.ownData"
+
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="handleSubmit(scope.row)"
+ v-hasPermi="['system:records:edit']"
+ >鎻愪氦妗堝嵎</el-button>
+ <el-button
+ v-if="scope.row.ownData||userId===1"
+
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="handleUpdate(scope.row)"
+ v-hasPermi="['system:records:edit']"
+ >淇敼</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ @click="handleDelete(scope.row)"
+ v-hasPermi="['system:records:remove']"
+ >鍒犻櫎</el-button>
+ <el-dropdown size="mini" v-hasPermi="['system:records:remove']" @command="(command) => handleCommand(command, scope.row)">
+ <el-button size="mini" type="text" icon="el-icon-d-arrow-right">鏇村</el-button>
+ <el-dropdown-menu slot="dropdown">
+
+ <el-dropdown-item command="handleAuthUser" icon="el-icon-user"
+ >鍒嗛厤鐢ㄦ埛</el-dropdown-item>
+ </el-dropdown-menu>
+ </el-dropdown>
+ </template>
+ </el-table-column>
+
+ <el-table-column label="鐘舵��" align="center" prop="recordStatus" width="120">
+ <template slot-scope="scope">
+ <el-button :type="scope.row.recordStatus === '鏈綍鍏�' ? 'danger' : 'success'" size="mini">
+ {{ scope.row.recordStatus }}
+ </el-button>
+ </template>
+ </el-table-column>
+
<!-- <el-table-column label="${comment}" align="center" prop="id" /> -->
<el-table-column label="妗f鍙�" align="center" prop="recordId" />
<el-table-column label="鍙戞枃鍙�" align="center" prop="inquiryNumber" />
- <el-table-column label="妗堝嵎棰樺悕" align="center" prop="caseTitle" />
+
+
+ <el-table-column label="妗堝嵎棰樺悕" align="center" prop="caseTitle" />
<el-table-column label="鍏紑灞炴��" align="center" prop="publicAttribute" />
<el-table-column label="缂栧埗鍗曚綅" align="center" prop="preparationUnit" />
<el-table-column label="缂栧埗鏃ユ湡" align="center" prop="preparationDate" width="180">
@@ -235,41 +443,7 @@
<el-table-column label="缂╁井鍙�" align="center" prop="microfilmNumber" />
<el-table-column label="澶囨敞" align="center" prop="remarks" />
<el-table-column label="鍘嗗彶鐩稿叧鍙戞枃鍙�" align="center" prop="historicalReferenceNumber" />
- <el-table-column label="鎿嶄綔" align="center" width="160" class-name="small-padding fixed-width">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleInfo(scope.row)"
- v-hasPermi="['system:records:edit']"
- >妗堝嵎璇︾粏淇℃伅</el-button>
- <el-button
- v-if="scope.row.ownData||scope.row.userId==1"
-
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['system:records:edit']"
- >淇敼</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['system:records:remove']"
- >鍒犻櫎</el-button>
- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
- <el-button size="mini" type="text" icon="el-icon-d-arrow-right">鏇村</el-button>
- <el-dropdown-menu slot="dropdown">
-
- <el-dropdown-item command="handleAuthUser" icon="el-icon-user"
- >鍒嗛厤鐢ㄦ埛</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </template>
- </el-table-column>
+<el-table-column label="椤圭洰鍚嶇О" align="center" prop="everyProjectName" />
</el-table>
<pagination
@@ -279,19 +453,230 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
+ <!-- Excel鎿嶄綔寮圭獥 -->
+ <el-dialog :visible.sync="excelDialogVisible" class="excel-dialog-overlay" @click="closeExcelDialog">
+ <div class="excel-dialog" @click.stop>
+ <div class="excel-dialog-header">
+ <h3>Excel鎿嶄綔</h3>
+ <p class="excel-dialog-tip">璇烽�夋嫨浠ヤ笅鎿嶄綔澶勭悊Excel鏂囦欢</p>
- <!-- 娣诲姞鎴栦慨鏀规。妗堣褰曞璇濇 -->
- <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+ <!-- <button class="excel-dialog-close" @click="closeExcelDialog">脳</button> -->
+ </div>
+ <div class="excel-dialog-body">
+ <!-- 閫夋嫨妗嗗尯鍩� -->
+ <div class="excel-options-section">
+ <!-- 浜岀淮鐮侀�夋嫨 -->
+ <div class="option-group">
+ <label class="option-label">
+ <input type="checkbox" v-model="excelOptions.includeQrCode">
+ <span>鍖呭惈鏉″舰鐮�</span>
+ </label>
+ </div>
+
+ <!-- 娉ㄨВ閫夋嫨 -->
+ <div class="option-group">
+ <div class="option-label">閫夋嫨娉ㄨВ:</div>
+ <div class="annotation-options">
+ <label v-for="(annotation, index) in excelOptions.selectedAnnotations" :key="index" class="signature-checkbox">
+ <input type="checkbox" v-model="excelOptions.subselectedAnnotations" :value="index">
+ <span>{{ annotation }}
+ </span>
+ </label>
+ </div>
+ </div>
+
+ <!-- 绛惧悕鏍忛�夋嫨 -->
+ <div class="option-group">
+ <div class="option-label">绛惧悕鏍忚缃�:</div>
+ <div class="signature-options">
+ <div class="signature-checkboxes">
+ <label v-for="(signature, index) in excelOptions.selectedSignatures" :key="index" class="signature-checkbox">
+ <input type="checkbox" v-model="excelOptions.subselectedSignatures" :value="index">
+ <span>{{ signature }}</span>
+ </label>
+
+
+
+ </div>
+<!-- <p v-if="excelOptions.selectedSignatures.length === 0" class="option-tip">璇烽�夋嫨鑷冲皯涓�涓鍚嶆爮</p> -->
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- 浼樺寲鐨凟xcel棰勮缁勪欢 -->
+ <el-dialog class="excel-preview-wrapper" :visible.sync="showExcelPreview" :modal="false" width="80%" :show-close="true" @click="closeExcelPreviewDialog">
+ <div @click.stop>
+ <!-- 涓昏棰勮缁勪欢 -->
+ <vue-office-excel
+ v-if="currentExcelUrl"
+ :src="currentExcelUrl"
+ style="width: 100%; height: 500px;"
+ @rendered="renderedHandler"
+ @error="handleExcelRenderError"
+ />
+
+ <!-- 閿欒鎻愮ず -->
+ <div v-if="excelRenderError" class="excel-error-message">
+ <h3>Excel娓叉煋澶辫触</h3>
+ <p>{{ excelRenderError }}</p>
+ <p>璇峰皾璇曚互涓嬭В鍐虫柟妗堬細</p>
+ <ul>
+ <li>涓嬭浇鏂囦欢鍚庝娇鐢‥xcel杞欢鎵撳紑</li>
+ <li>纭鏂囦欢鏍煎紡鏄惁涓烘敮鎸佺殑.xls鎴�.xlsx</li>
+ </ul>
+ <button class="excel-dialog-btn download-btn" @click="handleDownloadClick">涓嬭浇Excel鏂囦欢</button>
+ </div>
+ </div>
+</el-dialog>
+ <div class="excel-dialog-footer">
+ <button class="excel-dialog-btn preview-btn" @click="handlePreviewClick">棰勮</button>
+ <button class="excel-dialog-btn print-btn" @click="handlePrintClick">鎵撳嵃</button>
+ <button class="excel-dialog-btn download-btn" @click="handleDownloadClick">涓嬭浇</button>
+ </div>
+ </div>
+
+
+
+ </el-dialog>
+ <!-- 鏌ョ湅鏁版嵁鎸夐挳 -->
+ <el-dialog :title="title" :visible.sync="open_check" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="妗f鍙�" >
+
+
+<el-row :gutter="8">
+ <el-col :span="6">
+ <el-select
+ v-model="form.recordType"
+ placeholder="閫夋嫨妗f绫诲瀷"
+ disabled
+ @change="handleRecordTypeChange"
+ >
+ <el-option
+ v-for="item in recordTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-col>
+
+
+ <el-col :span="6">
+ <el-select
+
+ v-model="form.recordZone"
+ placeholder="閫夋嫨鍦板尯"
+ @change="handleRecordTypeChange"
+ disabled
+ >
+ <el-option
+ v-for="item in zoneTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-col>
+ <el-col :span="4">
+ <el-input
+ v-model="form.recordYear"
+ placeholder="杈撳叆骞翠唤"
+ disabled
+
+
+ @input="generateRecordId"
+ />
+ </el-col>
+ <el-col :span="4">
+ <el-input
+ v-model="form.recordSeq"
+ placeholder="鑷姩鐢熸垚"
+ disabled
+ />
+ </el-col>
+</el-row>
+ </el-form-item>
+ <el-form-item label="鍙戞枃鍙�" prop="inquiryNumber">
+ <el-input v-model="form.inquiryNumber" placeholder="璇疯緭鍏ュ彂鏂囧彿" disabled/>
+ </el-form-item>
+ <el-form-item label="寤鸿椤圭洰鍚嶇О" prop="projectName">
+ <el-input v-model="form.projectName" placeholder="璇疯緭鍏ュ缓璁鹃」鐩悕绉�" disabled/>
+ </el-form-item>
+ <div v-if="vis">
+ <el-form-item label="妗堝嵎棰樺悕" prop="caseTitle">
+ <el-input v-model="form.caseTitle" placeholder="璇疯緭鍏ユ鍗烽鍚�" disabled/>
+ </el-form-item>
+ <el-form-item label="鍏紑灞炴��" prop="publicAttribute">
+ <el-input v-model="form.publicAttribute" placeholder="璇疯緭鍏ュ叕寮�灞炴��" disabled />
+ </el-form-item>
+ <el-form-item label="缂栧埗鍗曚綅" prop="preparationUnit">
+ <el-input v-model="form.preparationUnit" placeholder="璇疯緭鍏ョ紪鍒跺崟浣�" disabled/>
+ </el-form-item>
+ <el-form-item label="缂栧埗鏃ユ湡" prop="preparationDate">
+ <el-date-picker clearable
+ v-model="form.preparationDate"
+ type="date"
+ disabled
+
+ value-format="yyyy-MM-dd"
+ placeholder="璇烽�夋嫨缂栧埗鏃ユ湡">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item label="淇濈鏈熼檺" prop="retentionPeriod">
+ <el-input v-model="form.retentionPeriod" placeholder="璇疯緭鍏ヤ繚绠℃湡闄�" disabled/>
+ </el-form-item>
+ <el-form-item label="瀵嗙骇" prop="securityClassification">
+ <el-input v-model="form.securityClassification" placeholder="璇疯緭鍏ュ瘑绾�" disabled/>
+ </el-form-item>
+ <el-form-item label="妗堝嵎椤垫暟" prop="pageCount">
+ <el-input v-model="form.pageCount" placeholder="璇疯緭鍏ユ鍗烽〉鏁�" disabled/>
+ </el-form-item>
+ <el-form-item label="绔嬫鍙�" prop="filingNumber">
+ <el-input v-model="form.filingNumber" placeholder="璇疯緭鍏ョ珛妗堝彿" disabled/>
+ </el-form-item>
+ <el-form-item label="寤鸿鍗曚綅" prop="constructionUnit">
+ <el-input v-model="form.constructionUnit" placeholder="璇疯緭鍏ュ缓璁惧崟浣�" disabled />
+ </el-form-item>
+ <el-form-item label="寤鸿鍦板潃" prop="constructionAddress">
+ <el-input v-model="form.constructionAddress" placeholder="璇疯緭鍏ュ缓璁惧湴鍧�" disabled/>
+ </el-form-item>
+
+ <el-form-item label="椤圭洰缂栧彿" prop="projectNumber">
+ <el-input v-model="form.projectNumber" placeholder="璇疯緭鍏ラ」鐩紪鍙�" disabled/>
+ </el-form-item>
+ <el-form-item label="鎵弿鍔犲伐鍏徃" prop="scanningCompany">
+ <el-input v-model="form.scanningCompany" placeholder="璇疯緭鍏ユ壂鎻忓姞宸ュ叕鍙�" disabled/>
+ </el-form-item>
+ <el-form-item label="妗f绠�(瀹�)鍙�" prop="archiveRoomNumber">
+ <el-input v-model="form.archiveRoomNumber" placeholder="璇疯緭鍏ユ。妗堢(瀹�)鍙�" disabled/>
+ </el-form-item>
+ <el-form-item label="缂╁井鍙�" prop="microfilmNumber">
+ <el-input v-model="form.microfilmNumber" placeholder="璇疯緭鍏ョ缉寰彿" disabled/>
+ </el-form-item>
+ <el-form-item label="澶囨敞" prop="remarks">
+ <el-input v-model="form.remarks" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" disabled/>
+ </el-form-item>
+ <el-form-item label="鍘嗗彶鐩稿叧鍙戞枃鍙�" prop="historicalReferenceNumber">
+ <el-input v-model="form.historicalReferenceNumber" placeholder="璇疯緭鍏ュ巻鍙茬浉鍏冲彂鏂囧彿" disabled/>
+ </el-form-item>
+ </div>
+ </el-form>
+
+ </el-dialog>
+ <!-- 娣诲姞鎴栦慨鏀规。妗堣褰曞璇濇 -->
+ <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
+ <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+ <el-form-item label="妗f鍙�" prop="recordId">
<el-row :gutter="8">
<el-col :span="6">
<el-select
+
v-model="form.recordType"
placeholder="閫夋嫨妗f绫诲瀷"
@change="handleRecordTypeChange"
- >
+ :disabled="userId!=1" >
<el-option
v-for="item in recordTypeOptions"
:key="item.value"
@@ -300,35 +685,86 @@
/>
</el-select>
</el-col>
- <el-col :span="6">
+
+
+ <el-col :span="6">
+ <el-select
+
+ v-model="form.recordZone"
+ placeholder="閫夋嫨鍦板尯"
+ @change="handleRecordTypeChange"
+ :disabled="userId!=1" >
+ <el-option
+ v-for="item in zoneTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-col>
+ <el-col :span="4">
<el-input
v-model="form.recordYear"
+ @input="generateRecordId"
+
placeholder="杈撳叆骞翠唤"
- @input="generateRecordId"
+:disabled="userId!=1"
/>
</el-col>
- <el-col :span="6">
+ <el-col :span="4">
<el-input
v-model="form.recordSeq"
- placeholder="鑷姩鐢熸垚"
- disabled
+ :disabled="userId!=1"
+ @input="generateRecordId"
+
+ placeholder="杈撳叆妗f搴忓彿"
/>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="鍙戞枃鍙�" prop="inquiryNumber">
- <el-input v-model="form.inquiryNumber" placeholder="璇疯緭鍏ュ彂闂彿" />
+ <el-input v-model="form.inquiryNumber" placeholder="璇疯緭鍏ュ彂鏂囧彿" :disabled="userId!=1"
+ />
</el-form-item>
- <el-form-item label="寤鸿椤圭洰鍚嶇О" prop="projectName">
- <el-input v-model="form.projectName" placeholder="璇疯緭鍏ュ缓璁鹃」鐩悕绉�" />
+ <el-form-item label="椤圭洰鍚嶇О" prop="everyProjectName">
+ <el-select
+ v-model="form.everyProjectName"
+ placeholder="璇烽�夋嫨椤圭洰鍚嶇О"
+
+ :disabled="userId!=1"
+ >
+ <el-option
+ v-for="item in projectOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
</el-form-item>
+
+
+
<div v-if="vis">
<el-form-item label="妗堝嵎棰樺悕" prop="caseTitle">
- <el-input v-model="form.caseTitle" placeholder="璇疯緭鍏ユ鍗烽鍚�" />
+ <el-input v-model="form.caseTitle" placeholder="鑷姩鐢熸垚" :readonly="true" />
</el-form-item>
<el-form-item label="鍏紑灞炴��" prop="publicAttribute">
- <el-input v-model="form.publicAttribute" placeholder="璇疯緭鍏ュ叕寮�灞炴��" />
+
+
+ <el-select
+ v-model="form.publicAttribute"
+ placeholder="璇烽�夋嫨鍏紑灞炴��"
+ clearable
+ >
+ <el-option
+ v-for="item in publicAttributeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
</el-form-item>
+
<el-form-item label="缂栧埗鍗曚綅" prop="preparationUnit">
<el-input v-model="form.preparationUnit" placeholder="璇疯緭鍏ョ紪鍒跺崟浣�" />
</el-form-item>
@@ -341,10 +777,32 @@
</el-date-picker>
</el-form-item>
<el-form-item label="淇濈鏈熼檺" prop="retentionPeriod">
- <el-input v-model="form.retentionPeriod" placeholder="璇疯緭鍏ヤ繚绠℃湡闄�" />
+ <el-select
+ v-model="form.retentionPeriod"
+ placeholder="璇烽�夋嫨淇濈鏈熼檺"
+ clearable
+ >
+ <el-option
+ v-for="item in retentionPeriodOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
</el-form-item>
<el-form-item label="瀵嗙骇" prop="securityClassification">
- <el-input v-model="form.securityClassification" placeholder="璇疯緭鍏ュ瘑绾�" />
+ <el-select
+ v-model="form.securityClassification"
+ placeholder="璇烽�夋嫨瀵嗙骇"
+ clearable
+ >
+ <el-option
+ v-for="item in securityLevelOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
</el-form-item>
<el-form-item label="妗堝嵎椤垫暟" prop="pageCount">
<el-input v-model="form.pageCount" placeholder="璇疯緭鍏ユ鍗烽〉鏁�" />
@@ -358,7 +816,10 @@
<el-form-item label="寤鸿鍦板潃" prop="constructionAddress">
<el-input v-model="form.constructionAddress" placeholder="璇疯緭鍏ュ缓璁惧湴鍧�" />
</el-form-item>
-
+ <el-form-item label="寤鸿椤圭洰鍚嶇О" prop="projectName">
+ <el-input v-model="form.projectName" placeholder="璇疯緭鍏ュ缓璁鹃」鐩悕绉�" />
+ <!-- <el-input v-model="form.projectName" placeholder="璇疯緭鍏ュ缓璁鹃」鐩悕绉�" :disabled="userId!=1"/> -->
+ </el-form-item>
<el-form-item label="椤圭洰缂栧彿" prop="projectNumber">
<el-input v-model="form.projectNumber" placeholder="璇疯緭鍏ラ」鐩紪鍙�" />
</el-form-item>
@@ -388,18 +849,39 @@
</template>
<script>
-import { listRecords,getMaxId, getRecords, delRecords, addRecords, updateRecords } from "@/api/system/records"
-import { listAllCategory } from "@/api/system/category"
+import VueOfficeExcel from '@vue-office/excel'
+import '@vue-office/excel/lib/index.css'
+import axios from 'axios'
+import { getToken } from '@/utils/auth'
+import { enload, batchSubmitRecords,updateStatusById,listRecords,getMaxId, getRecords, delRecords, addRecords, updateRecords } from "@/api/system/records"
+import { listAllCategory } from "@/api/system/category"
+import { listAllProjectName } from "@/api/system/projectName"
+import { listPlaceName, listAllPlaceName } from "@/api/system/placeName"
export default {
+ components: {
+ VueOfficeExcel
+ },
name: "Records",
data() {
return {
+ showExcelPreview: false,
+ excel: 'http://localhost:8080/profile/upload/12.xls', //璁剧疆鏂囨。缃戠粶鍦板潃锛屽彲浠ユ槸鐩稿鍦板潃
+
+ open_check: false,
+ securityLevelOptions: [
+ { value: '绉樺瘑', label: '绉樺瘑' },
+ { value: '鏅��', label: '鏅��' }
+ ],
maxId: 0,
- // 妗f绫诲瀷閫夐」
- recordTypeOptions: [],
- // 淇濈鏈熼檺閫夐」
- retentionPeriodOptions: [
+ // 椤圭洰鍚嶇О閫夐」
+ projectOptions: [],
+ // 妗f绫诲瀷閫夐」
+ recordTypeOptions: [],
+ //鍦板尯绫诲瀷
+ zoneTypeOptions: [],
+ // 淇濈鏈熼檺閫夐」
+ retentionPeriodOptions: [
{ value: "10骞�", label: "10骞�" },
{ value: "30骞�", label: "30骞�" },
{ value: "姘镐箙", label: "姘镐箙" }
@@ -411,7 +893,8 @@
{ value: "鍏嶄簣鍏紑", label: "鍏嶄簣鍏紑" }
],
amio: false,
- vis: false,
+ userId: null,
+ vis: true,
// 閬僵灞�
loading: true,
// 閫変腑鏁扮粍
@@ -436,6 +919,12 @@
pageSize: 10,
recordId: null,
inquiryNumber: null,
+ categoryType: null, // 绫诲埆绫诲瀷
+ categoryZone: null, // 绫诲埆鍦板尯
+ categoryYear: null, // 绫诲埆骞翠唤
+ categorySeq: null, // 寮�濮嬪簭鍙�
+ categorySeqEnd: null, // 缁撴潫搴忓彿
+ everyProjectName: null,
caseTitle: null,
publicAttribute: null,
preparationUnit: null,
@@ -454,6 +943,28 @@
remarks: null,
historicalReferenceNumber: null
},
+ // Excel寮圭獥鐩稿叧鏁版嵁
+ excelDialogVisible: false,
+ currentExcelUrl: '',
+ currentExcelBlob: null,
+ currentExcelId: '',
+ excelLoading: false,
+ excelPreviewTimeout: null,
+ excelRenderError: '', // Excel娓叉煋閿欒淇℃伅
+ // Excel閫夐」閰嶇疆
+ excelOptions: {
+ includeQrCode: false, // 鏄惁鍖呭惈浜岀淮鐮�
+ selectedAnnotations: ["鏈竻鍗曠敱妗f褰㈡垚閮ㄩ棬瀹屾垚",
+ "鏂囦欢绫诲瀷蹇呴』褰曞叆锛屽寘鎷粨璁烘潗鏂欍�佽繃绋嬫潗鏂欍�佺敵璇锋潗鏂欙紝鍏朵粬鏉愭枡",
+ "鍏紑灞炴�у繀椤诲綍鍏ワ紝涓诲姩鍏紑銆佷緷鐢宠鍏紑銆佸厤浜堝叕寮�",
+ "淇濈鏈熼檺:30骞存垨姘镐箙",
+ "椤靛彿鎸夌収姝e紡褰曞叆椤电爜涓哄噯"], // 閫変腑鐨勬敞瑙e垪琛�
+ includeSignature: false, // 鏄惁鍖呭惈绛惧悕鏍�
+ selectedSignatures: ['涓氬姟绉戝绉讳氦浜�:', '瀹℃壒绉戠Щ浜や汉:', '妗f鏁寸悊鍏徃:'], // 閫変腑鐨勭鍚嶆爮鍒楄〃
+ subselectedSignatures: [],
+ subselectedAnnotations: [],
+ signaturePosition: 'bottom' // 绛惧悕鏍忎綅缃細top/bottom
+ },
// 琛ㄥ崟鍙傛暟
form: {
recordSeq: '',
@@ -464,46 +975,158 @@
{ required: true, message: "妗f鍙蜂笉鑳戒负绌�", trigger: "blur" }
],
inquiryNumber: [
- { required: true, message: "鍙戦棶鍙蜂笉鑳戒负绌�", trigger: "blur" }
+ { required: true, message: "鍙戞枃鍙蜂笉鑳戒负绌�", trigger: "blur" }
+ ],
+ everyProjectName: [
+ { required: true, message: "椤圭洰鍚嶇О涓嶈兘涓虹┖", trigger: ['change', 'blur']}
+ ],
+ caseTitle: [
+ { required: true, message: "妗堝嵎棰樺悕涓嶈兘涓虹┖", trigger: "blur" }
+ ],
+ constructionUnit: [
+ { required: true, message: "寤鸿鍗曚綅涓嶈兘涓虹┖", trigger: "blur" }
],
projectName: [
- { required: true, message: "椤圭洰鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
- ],
+ { required: true, message: "寤鸿椤圭洰鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+ ]
}
}
},
created() {
- this.getList()
+ // 鐩戝惉ESC閿叧闂脊绐�
+ document.addEventListener('keydown', this.handleKeyDown);
+ this.userId = this.$store.state.user.id;
- this.getId()
+// 鑾峰彇鐢ㄦ埛瑙掕壊
+ // this.getId()
this.getRecordTypes()
-
-
+ this.getZoneOptions()
+ this.fetchProjectOptions()
+this.getList()
+ },
+ watch: {
+ 'form.constructionUnit': {
+ handler() {
+ this.generateCaseTitle();
+ },
+ immediate: true
+ },
+ 'form.constructionAddress': {
+ handler() {
+ this.generateCaseTitle();
+ },
+ immediate: true
+ },
+ 'form.projectName': {
+ handler() {
+ this.generateCaseTitle();
+ },
+ immediate: true
+ }
+ },
+ beforeDestroy() {
+ // 娓呯悊浜嬩欢鐩戝惉鍣ㄥ拰瀹氭椂鍣�
+ document.removeEventListener('keydown', this.handleKeyDown);
+ if (this.excelPreviewTimeout) {
+ clearTimeout(this.excelPreviewTimeout);
+ }
+ if (this.currentExcelUrl) {
+ URL.revokeObjectURL(this.currentExcelUrl);
+ }
},
methods: {
+ /** Excel娓叉煋瀹屾垚澶勭悊 */
+ renderedHandler() {
+ console.log("Excel娓叉煋瀹屾垚");
+ this.excelLoading = false;
+ this.excelRenderError = '';
+ },
+ /** Excel娓叉煋閿欒澶勭悊 */
+ handleExcelRenderError(error) {
+ console.error("Excel娓叉煋澶辫触:", error);
+ this.excelLoading = false;
+
+ // 璁剧疆鍙嬪ソ鐨勯敊璇俊鎭�
+ if (error && error.message) {
+ this.excelRenderError = error.message;
+ } else {
+ this.excelRenderError = '鏃犳硶娓叉煋姝xcel鏂囦欢锛屽彲鑳芥槸鏂囦欢鏍煎紡涓嶅吋瀹规垨宸叉崯鍧忋��';
+ }
+
+ // 灏濊瘯澶囬�夋柟妗�
+ this.tryAlternativePreview();
+ },
+ /** 灏濊瘯澶囬�夐瑙堟柟妗� */
+ tryAlternativePreview() {
+ console.log('灏濊瘯澶囬�夐瑙堟柟妗�...');
+ },
getId()
{
- var _this = this;
+ var _this = this;
getMaxId().then(response=>{
// alert(213)
console.log(response)
- _this.maxId = String(response.data).padStart(5, '0')
-
- _this.$set(_this.form, 'recordSeq', _this.maxId) //
-
+ _this.maxId = String(response.data).padStart(4, '0')
+
+ _this.$set(_this.form, 'recordSeq', _this.maxId) //
+
// alert(this.maxId)
})
},
+ // 鐢熸垚妗堝嵎棰樺悕
+ generateCaseTitle() {
+ let titleParts = [];
+
+ if (this.form.constructionUnit) {
+ titleParts.push(this.form.constructionUnit);
+ }
+
+ if (this.form.constructionAddress) {
+ titleParts.push(this.form.constructionAddress);
+ }
+
+ if (this.form.projectName) {
+ titleParts.push(this.form.projectName);
+ }
+
+ this.form.caseTitle = titleParts.join('');
+ },
+ async getZoneOptions()
+ {
+ try {
+ const response = await listAllPlaceName()
+ console.log("1111111333333",response.data)
+ this.zoneTypeOptions = response.data.data.map(item => ({
+ value: item.nnumber,
+ label: item.nnumber
+ }))
+ } catch (error) {
+ console.error('鑾峰彇椤圭洰鍚嶇О鍒楄〃澶辫触:', error)
+ }
+ },
+ async fetchProjectOptions() {
+ try {
+ const response = await listAllProjectName()
+ console.log("1111111",response)
+ this.projectOptions = response.data.data.map(item => ({
+ value: item.name,
+ label: item.name
+ }))
+ } catch (error) {
+ console.error('鑾峰彇椤圭洰鍚嶇О鍒楄〃澶辫触:', error)
+ }
+ },
/** 鑾峰彇妗f绫诲瀷鍒楄〃 */
getRecordTypes() {
- listAllCategory().then(response => {
- console.log(response)
- console.log("----=============--------------")
- this.recordTypeOptions = response.data.map(item => ({
- value: item.numb,
- label: item.nname
- }))
- })
+ return new Promise((resolve) => {
+ listAllCategory().then(response => {
+ this.recordTypeOptions = response.data.map(item => ({
+ value: item.numb,
+ label: item.numb
+ }))
+ resolve()
+ })
+ })
},
/** 妗f绫诲瀷鍙樻洿澶勭悊 */
@@ -513,14 +1136,15 @@
/** 鐢熸垚妗f鍙� */
generateRecordId() {
-
- if (this.form.recordType && this.form.recordYear) {
+
+ if (this.form.recordType && this.form.recordZone && this.form.recordYear && this.form.recordSeq) {
+
// getNextRecordId({
// type: this.form.recordType,
// year: this.form.recordYear
// }).then(response => {
// this.form.recordSeq = response.data.seq
- this.form.recordId = `${this.form.recordType}-${this.form.recordYear}-${this.form.recordSeq}`
+ this.form.recordId = `${this.form.recordType}-${this.form.recordZone}-${this.form.recordYear}-${this.form.recordSeq}`
// })
}
},
@@ -529,7 +1153,37 @@
this.loading = true
console.log(this.queryParams)
console.log("--------------")
- listRecords(this.queryParams).then(response => {
+ // 鍒涘缓queryParams鐨勫壇鏈紝閬垮厤鐩存帴淇敼鍘熷璞�
+ const queryParams = { ...this.queryParams }
+
+ // 澶勭悊绫诲埆鍙锋悳绱�
+ if (queryParams.categoryType || queryParams.categoryZone || queryParams.categoryYear || queryParams.categorySeq || queryParams.categorySeqEnd) {
+ // 鏋勫缓鍩虹閮ㄥ垎
+ const baseParts = []
+ if (queryParams.categoryType) baseParts.push(queryParams.categoryType)
+ if (queryParams.categoryZone) baseParts.push(queryParams.categoryZone)
+ if (queryParams.categoryYear) baseParts.push(queryParams.categoryYear)
+ const baseCategory = baseParts.join('-')
+
+ // 鍒ゆ柇鏄崟涓簭鍙锋悳绱㈣繕鏄寖鍥存悳绱�
+ if (queryParams.categorySeq && queryParams.categorySeqEnd) {
+ // 鑼冨洿鎼滅储锛氭瀯寤哄紑濮嬪拰缁撴潫绫诲埆鍙�
+ queryParams.categoryNumberStart = baseCategory ? baseCategory + '-' + queryParams.categorySeq : queryParams.categorySeq
+ queryParams.categoryNumberEnd = baseCategory ? baseCategory + '-' + queryParams.categorySeqEnd : queryParams.categorySeqEnd
+ } else if (queryParams.categorySeq) {
+ // 鍗曚釜搴忓彿鎼滅储锛氭瀯寤哄畬鏁寸殑绫诲埆鍙�
+ queryParams.categoryNumber = baseCategory ? baseCategory + '-' + queryParams.categorySeq : queryParams.categorySeq
+ }
+
+ // 鍒犻櫎鍗曠嫭鐨勫瓧娈碉紝閬垮厤閲嶅鎼滅储
+ delete queryParams.categoryType
+ delete queryParams.categoryZone
+ delete queryParams.categoryYear
+ delete queryParams.categorySeq
+ delete queryParams.categorySeqEnd
+ }
+
+ listRecords(queryParams).then(response => {
console.log(response)
this.recordsList = response.data.data
@@ -548,6 +1202,7 @@
id: null,
recordId: null,
inquiryNumber: null,
+ everyProjectName: null,
caseTitle: null,
publicAttribute: null,
preparationUnit: null,
@@ -588,7 +1243,7 @@
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
this.reset()
- this.form.recordSeq = this.maxId
+ // this.form.recordSeq = this.maxId
this.open = true
this.vis = false;
this.title = "娣诲姞妗f璁板綍"
@@ -599,28 +1254,116 @@
var mid = row.id
const roleId = 2
- alert(mid)
+ // alert(mid)
var recordId = mid
// this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+recordId)
this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId)
},
+ //
+ handleSubmit(row)
+ {
+ //alert(row.id)
+ var id = row.id
+ var status = '褰曞叆瀹屾垚'
+ updateStatusById(status, id).then(response=>{
+ this.$modal.msgSuccess("鎻愪氦鎴愬姛")
+ this.getList()
+ })
+ },
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
this.reset()
- this.vis = true;
+ if(this.userId===1)
+ this.vis = false;
const id = row.id || this.ids
getRecords(id).then(response => {
console.log(response)
console.log("----=============--------------")
this.form = response.data
+ // 纭繚recordTypeOptions宸插姞杞�
+ if(this.recordTypeOptions.length > 0) {
+ const recordParts = response.data.recordId.split('-')
+ this.$set(this.form, 'recordType', recordParts[0])
+ if(this.recordTypeOptions.length==4)
+ {
+ this.$set(this.form, 'recordZone', recordParts[1])
+
+ this.$set(this.form, 'recordYear', recordParts[2])
+ this.$set(this.form, 'recordSeq', recordParts[3])
+ }
+ else
+ {
+ this.$set(this.form, 'recordYear', recordParts[1])
+ this.$set(this.form, 'recordSeq', recordParts[2])
+ }
+ }
this.open = true
this.title = "淇敼妗f璁板綍"
})
},
+ /** 鎵归噺鎻愪氦 */
+ handleBatchSubmit() {
+ // alert(this.ids)
+ if (this.ids.length === 0) {
+ this.$modal.msgWarning('璇烽�夋嫨瑕佹彁浜ょ殑妗f璁板綍')
+ return
+ }
+ const myValidIds = this.recordsList
+ .filter(item => item.ownData === true)
+ .map(item => item.id);
+ // 妫�鏌ラ�変腑鐨処D鏄惁鍏ㄩ儴灞炰簬鑷繁
+ const invalidIds = this.ids.filter(id => !myValidIds.includes(id));
+
+ if (invalidIds.length > 0) {
+ this.$message.error(`鍖呭惈鏃犳潈鎿嶄綔鐨処D: ${invalidIds.join(',')}`);
+ return false;
+ }
+ //濡傛灉id鍏ㄩ儴鏈夋晥鎵嶇户缁彁浜�
+ batchSubmitRecords( this.ids ).then(response => {
+ if (response.code === 0) {
+ this.$modal.msgSuccess('鎵归噺鎻愪氦鎴愬姛')
+ this.getList()
+ this.ids = []
+ } else {
+ this.$modal.msgError(response.msg || '鎵归噺鎻愪氦澶辫触')
+ }
+ })
+ },
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleCheck(row) {
+
+this.vis = true;
+const id = row.id || this.ids
+getRecords(id).then(response => {
+ console.log(response)
+ console.log("----=============--------------")
+ this.form = response.data
+ if(this.recordTypeOptions.length > 0) {
+ const recordParts = response.data.recordId.split('-')
+ this.$set(this.form, 'recordType', recordParts[0])
+ if(this.recordTypeOptions.length==4)
+ {
+ this.$set(this.form, 'recordZone', recordParts[1])
+
+ this.$set(this.form, 'recordYear', recordParts[2])
+ this.$set(this.form, 'recordSeq', recordParts[3])
+ }
+ else
+ {
+ this.$set(this.form, 'recordYear', recordParts[1])
+ this.$set(this.form, 'recordSeq', recordParts[2])
+ }
+ }
+ this.open_check = true
+ this.title = "鏌ョ湅妗f璁板綍"
+})
+},
+
/** 鎻愪氦鎸夐挳 */
submitForm() {
+ console.log(this.form)
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
@@ -630,10 +1373,19 @@
this.getList()
})
} else {
+ console.log(this.form)
+
addRecords(this.form).then(response => {
+ console.log(response)
+ if(response.code==0)
+ this.$modal.msgError(response.msg)
+ else{
this.$modal.msgSuccess("鏂板鎴愬姛")
this.open = false
- this.getList()
+ this.getId()
+ this.getList()}
+
+
})
}
}
@@ -657,7 +1409,7 @@
handleAuthUser: function(row) {
const roleId = 2
var archiveRecordsId = row.recordId
- // alert(roleId)
+
this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+archiveRecordsId)
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
@@ -672,10 +1424,957 @@
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
- this.download('system/records/export', {
- ...this.queryParams
+ // 妫�鏌ユ槸鍚︽湁閫変腑鐨勮褰�
+ //alert(234)
+ // alert(this.ids.length)
+ if (this.ids && this.ids.length > 0) {
+ // 鍙鍑洪�変腑鐨勮褰�
+ this.download('system/records/export', {
+ ids: this.ids.join(',') // 灏嗛�変腑鐨処D鏁扮粍杞崲涓洪�楀彿鍒嗛殧鐨勫瓧绗︿覆
+ }, `records_${new Date().getTime()}.xlsx`)
+ } else {
+ // 娌℃湁閫変腑璁板綍鏃讹紝瀵煎嚭绗﹀悎鏌ヨ鏉′欢鐨勬墍鏈夎褰�
+ this.download('system/records/export', {
+ ...this.queryParams
+ }, `records_${new Date().getTime()}.xlsx`)
+ }
+ },
+
+ /** 鏌ョ湅骞舵墦鍗癊xcel鏂囦欢 */
+ viewAndPrintExcel(row) {
+ const id = row.id || this.ids;
+ // alert(id)
+ this.recordId = id;
+ this.$modal.loading('姝e湪鑾峰彇Excel鏂囦欢锛岃绋嶅��...');
+
+ // 浠庡悗绔幏鍙朎xcel鏂囦欢
+ this.getExcelFile(id).then(blob => {
+ this.$modal.closeLoading();
+ // 淇濆瓨鏂囦欢淇℃伅骞舵樉绀洪潤鎬佸脊绐�
+ this.currentExcelUrl = URL.createObjectURL(blob);
+ this.currentExcelBlob = blob;
+ this.currentExcelId = id;
+ this.excelDialogVisible = true;
+ this.excelLoading = false;
+ }).catch(error => {
+ this.$modal.closeLoading();
+ console.error('鑾峰彇Excel鏂囦欢澶辫触:', error);
+ this.$modal.msgError('鑾峰彇Excel鏂囦欢澶辫触锛岃绋嶅悗閲嶈瘯');
+ });
+ },
+
+ /** 澶勭悊閿洏浜嬩欢 - ESC閿叧闂脊绐� */
+ handleKeyDown(e) {
+ if (e.key === 'Escape' && this.excelDialogVisible) {
+ this.closeExcelDialog();
+ }
+ },
+
+ /** 鍏抽棴Excel寮圭獥骞舵竻鐞嗚祫婧� */
+ closeExcelDialog() {
+ this.excelDialogVisible = false;
+ // alert(this.excelDialogVisible)
+ if (this.excelPreviewTimeout) {
+ clearTimeout(this.excelPreviewTimeout);
+ this.excelPreviewTimeout = null;
+ }
+ if (this.currentExcelUrl) {
+ URL.revokeObjectURL(this.currentExcelUrl);
+ this.currentExcelUrl = '';
+ }
+ this.currentExcelBlob = null;
+ },
+closeExcelPreviewDialog()
+{
+
+ this.showExcelPreview = false;
+},
+ /** 澶勭悊棰勮鎸夐挳鐐瑰嚮 */
+ handlePreviewClick() {
+ this.showExcelPreview = true;
+ this.excelRenderError = '';
+ var id = this.recordId ;
+ this.$modal.loading('姝e湪鑾峰彇Excel鏂囦欢锛岃绋嶅��...');
+
+ // 浠庡悗绔幏鍙朎xcel鏂囦欢
+ this.getExcelFile(id).then(blob => {
+ this.$modal.closeLoading();
+ // 淇濆瓨鏂囦欢淇℃伅骞舵樉绀洪潤鎬佸脊绐�
+ this.currentExcelUrl = URL.createObjectURL(blob);
+ this.currentExcelBlob = blob;
+ this.currentExcelId = id;
+ this.excelDialogVisible = true;
+ this.excelLoading = false;
+ }).catch(error => {
+ this.$modal.closeLoading();
+ console.error('鑾峰彇Excel鏂囦欢澶辫触:', error);
+ this.$modal.msgError('鑾峰彇Excel鏂囦欢澶辫触锛岃绋嶅悗閲嶈瘯');
+ });
+ // 閲嶇疆vue-office-excel缁勪欢
+ if (this.currentExcelUrl) {
+ const tempUrl = this.currentExcelUrl;
+ this.currentExcelUrl = '';
+ this.$nextTick(() => {
+ this.currentExcelUrl = tempUrl;
+ });
+ }
+
+ const previewContainer = this.$refs.excelPreviewContainer;
+
+ // 娓呯┖棰勮瀹瑰櫒
+ if (previewContainer) {
+ previewContainer.innerHTML = '';
+
+ // 灏濊瘯浣跨敤寰蒋Office Online棰勮鏈嶅姟浣滀负澶囬��
+ const officeOnlineUrl = `https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(this.currentExcelUrl)}`;
+
+ // 鍒涘缓iframe鐢ㄤ簬棰勮
+ const iframe = document.createElement('iframe');
+ iframe.style.width = '100%';
+ iframe.style.height = '100%';
+ iframe.style.border = 'none';
+ iframe.style.minHeight = '600px';
+ iframe.src = officeOnlineUrl;
+ iframe.title = 'Excel鏂囦欢棰勮';
+
+ // 鍒涘缓鍔犺浇鎸囩ず鍣�
+ const loadingIndicator = document.createElement('div');
+ loadingIndicator.className = 'loading-indicator';
+ loadingIndicator.innerHTML = `
+ <div class="loading-spinner"></div>
+ <p>姝e湪鍔犺浇Excel鏂囦欢锛岃绋嶅��...</p>
+ `;
+ previewContainer.style.position = 'relative';
+ previewContainer.appendChild(iframe);
+ previewContainer.appendChild(loadingIndicator);
+
+ // 鐩戝惉iframe鍔犺浇瀹屾垚
+ iframe.onload = () => {
+ this.excelLoading = false;
+ if (loadingIndicator && loadingIndicator.parentNode) {
+ loadingIndicator.parentNode.removeChild(loadingIndicator);
+ }
+ };
+
+ // 璁剧疆瓒呮椂澶勭悊
+ this.excelPreviewTimeout = setTimeout(() => {
+ this.excelLoading = false;
+ if (loadingIndicator && loadingIndicator.parentNode) {
+ loadingIndicator.parentNode.removeChild(loadingIndicator);
+ }
+
+ // 灏濊瘯鐩存帴棰勮浣滀负澶囬�夋柟妗�
+ previewContainer.innerHTML = '';
+ const directIframe = document.createElement('iframe');
+ directIframe.style.width = '100%';
+ directIframe.style.height = '100%';
+ directIframe.style.border = 'none';
+ directIframe.style.minHeight = '600px';
+ directIframe.src = this.currentExcelUrl;
+
+ const fallbackMessage = document.createElement('div');
+ fallbackMessage.textContent = 'Office棰勮鏈嶅姟鍔犺浇瓒呮椂锛屾鍦ㄥ皾璇曠洿鎺ラ瑙�...';
+ fallbackMessage.style.cssText = `
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ padding: 10px;
+ background-color: #f56c6c;
+ color: white;
+ text-align: center;
+ font-size: 14px;
+ z-index: 10;
+ `;
+
+ previewContainer.appendChild(directIframe);
+ previewContainer.appendChild(fallbackMessage);
+
+ directIframe.onload = () => {
+ if (fallbackMessage && fallbackMessage.parentNode) {
+ fallbackMessage.parentNode.removeChild(fallbackMessage);
+ }
+ };
+
+ // 浜屾瓒呮椂澶勭悊
+ setTimeout(() => {
+ if (directIframe && directIframe.parentNode) {
+ directIframe.parentNode.removeChild(directIframe);
+ }
+ const errorMessage = document.createElement('div');
+ errorMessage.innerHTML = `
+ <div style="text-align: center; padding: 40px;">
+ <h3 style="color: #f56c6c; margin-bottom: 20px;">棰勮澶辫触</h3>
+ <p style="color: #666; margin-bottom: 30px;">鏃犳硶鍦ㄦ祻瑙堝櫒涓瑙圗xcel鏂囦欢锛岃鐐瑰嚮涓嬫柟鎸夐挳涓嬭浇鏂囦欢鍚庢煡鐪嬨��</p>
+ <button onclick="this.parentNode.parentNode.querySelector('.download-btn').click()"
+ style="padding: 8px 20px; background: #409EFF; color: white; border: none; border-radius: 4px; cursor: pointer;">
+ 涓嬭浇Excel鏂囦欢
+ </button>
+ </div>
+ `;
+ previewContainer.appendChild(errorMessage);
+ }, 20000);
+ }, 25000);
+ }
+ },
+
+ /** 澶勭悊鎵撳嵃鎸夐挳鐐瑰嚮 */
+ handlePrintClick() {
+ if (this.currentExcelUrl) {
+ // 鍒涘缓涓�涓复鏃秈frame鐢ㄤ簬鎵撳嵃
+ const iframe = document.createElement('iframe');
+ iframe.style.position = 'absolute';
+ iframe.style.left = '-9999px';
+ iframe.style.top = '-9999px';
+ iframe.style.width = '210mm';
+ iframe.style.height = '297mm';
+ document.body.appendChild(iframe);
+
+ // 鐩戝惉iframe鍔犺浇瀹屾垚
+ iframe.onload = () => {
+ try {
+ // 鎵ц鎵撳嵃
+ iframe.contentWindow.print();
+
+ // 璁剧疆瓒呮椂绉婚櫎iframe
+ setTimeout(() => {
+ if (iframe && iframe.parentNode) {
+ iframe.parentNode.removeChild(iframe);
+ }
+ }, 1000);
+ } catch (error) {
+ console.error('Print error:', error);
+ // 鎵撳嵃澶辫触鏃讹紝鎻愮ず鐢ㄦ埛涓嬭浇
+ this.$confirm('鎵撳嵃澶辫触锛屾槸鍚︿笅杞芥枃浠讹紵', '鎻愮ず', {
+ confirmButtonText: '涓嬭浇',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ this.handleDownloadClick();
+ });
+
+ // 绉婚櫎iframe
+ if (iframe && iframe.parentNode) {
+ iframe.parentNode.removeChild(iframe);
+ }
+ }
+ };
+
+ // 璁剧疆iframe鐨剆rc
+ iframe.src = this.currentExcelUrl;
+ }
+ },
+
+ /** 澶勭悊涓嬭浇鎸夐挳鐐瑰嚮 */
+ handleDownloadClick() {
+ if (this.currentExcelUrl) {
+ // 鑾峰彇鐢ㄦ埛閫夋嫨鐨勯�夐」
+ const { includeQrCode, selectedAnnotations } = this.excelOptions;
+ console.log('涓嬭浇閫夐」:', { includeQrCode, selectedAnnotations });
+
+ // 鍒涘缓涓嬭浇閾炬帴锛屾枃浠跺悕鍖呭惈閫夐」淇℃伅
+ const link = document.createElement('a');
+ link.href = this.currentExcelUrl;
+
+ // 鏋勫缓鏂囦欢鍚嶏紝鍖呭惈閫夐」淇℃伅
+ let filename = `record_${this.currentExcelId}`;
+ if (includeQrCode) filename += '_qr';
+ // if (selectedAnnotations.length > 0) {
+ // filename += `_anno${selectedAnnotations.join('')}`;
+ // }
+ filename += `_${new Date().getTime()}.xlsx`;
+
+ link.download = filename;
+
+ // 瑙﹀彂涓嬭浇
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+
+ // 鎻愮ず涓嬭浇鎴愬姛
+ this.$modal.msgSuccess('Excel鏂囦欢涓嬭浇鎴愬姛');
+ }
+ },
+
+ /** 妫�鏌ユ祻瑙堝櫒鏄惁鍙兘鏀寔鐩存帴棰勮Excel */
+ canPreviewExcelInBrowser() {
+ // 鐜板湪鎴戜滑浣跨敤寰蒋Office Online鏈嶅姟锛屽鎵�鏈夌幇浠f祻瑙堝櫒閮芥敮鎸侀瑙�
+ return true;
+ },
+
+ /** 澶勭悊Excel棰勮瓒呮椂鎯呭喌 */
+ handleExcelPreviewTimeout(url, iframe) {
+ // 瓒呮椂鍚庯紝鎻愪緵鍦ㄦ柊绐楀彛鎵撳紑鐨勯�夐」
+ this.$confirm('Excel鏂囦欢鍔犺浇瓒呮椂锛屾槸鍚﹀湪鏂扮獥鍙d腑鎵撳紑锛�', '鎻愮ず', {
+ confirmButtonText: '鎵撳紑',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ window.open(url, '_blank');
+ }).finally(() => {
+ // 娓呯悊锛氱Щ闄frame骞堕噴鏀綰RL瀵硅薄
+ this.cleanupExcelPreview(iframe, url);
+ });
+ },
+
+ /** 娓呯悊Excel棰勮鐩稿叧璧勬簮骞跺叧闂璇濇 */
+ cleanupExcelPreview(iframe, url) {
+ setTimeout(() => {
+ if (iframe && iframe.parentNode) {
+ document.body.removeChild(iframe);
+ }
+ if (url) {
+ URL.revokeObjectURL(url);
+ }
+ this.excelRenderError = '';
+ this.showExcelPreview = false; // 鍏抽棴棰勮瀵硅瘽妗�
+ }, 1000);
+ },
+
+ /** 浠庡悗绔幏鍙朎xcel鏂囦欢 */
+ getExcelFile(id) {
+ var includeQrCode = this.excelOptions.includeQrCode;
+ var urls = `${process.env.VUE_APP_BASE_API}/system/records/recordFileList`+"/"+includeQrCode;
+
+
+ if(this.excelOptions.subselectedSignatures.length!=0)
+ {
+ var selectedSignatures = this.excelOptions.subselectedSignatures
+ urls = urls +'/'+ selectedSignatures
+ }
+ if(this.excelOptions.subselectedAnnotations.length!=0)
+ {
+ var selectedAnnotations = this.excelOptions.subselectedAnnotations
+ urls = urls+"/"+selectedAnnotations
+ }
+
+ return new Promise((resolve, reject) => {
+ // 棣栧厛灏濊瘯浣跨敤axios锛堥」鐩凡鏈夌殑HTTP瀹㈡埛绔級
+ try {
+ // 鑾峰彇鐢ㄦ埛閫夋嫨鐨勬敞瑙�
+ const { selectedAnnotations } = this.excelOptions;
+
+ // 鏋勫缓鍙傛暟锛屽寘鍚敞瑙e唴瀹�
+ const params = {
+ recordId: id,
+
+ };
+
+ axios({
+ method: 'Post',
+ url: urls,
+ params: params,
+ responseType: 'blob',
+ headers: { 'Authorization': 'Bearer ' + getToken() }
+ }).then(response => {
+ resolve(response.data);
+ }).catch(error => {
+ // 濡傛灉axios澶辫触锛屽洖閫�鍒癤MLHttpRequest
+ console.warn('Axios璇锋眰澶辫触锛屽皾璇曚娇鐢╔MLHttpRequest:', error);
+ this.fallbackGetExcelFile(id, resolve, reject);
+ });
+ } catch (e) {
+ // 鎹曡幏浠讳綍鎰忓閿欒
+ reject(new Error('鑾峰彇Excel鏂囦欢鏃跺彂鐢熼敊璇�: ' + e.message));
+ }
+ });
+ },
+
+ /** 澶囩敤鐨刋MLHttpRequest鑾峰彇Excel鏂囦欢鏂规硶 */
+ fallbackGetExcelFile(id, resolve, reject) {
+ try {
+ const xhr = new XMLHttpRequest();
+
+ // 鏋勫缓鏌ヨ鍙傛暟锛屽寘鍚敞瑙e唴瀹�
+ const queryParams = new URLSearchParams({
+ id: id,
+ annotation1: "鏈竻鍗曠敱妗f褰㈡垚閮ㄩ棬瀹屾垚",
+ annotation2: "鏂囦欢绫诲瀷蹇呴』褰曞叆锛屽寘鎷粨璁烘潗鏂欍�佽繃绋嬫潗鏂欍�佺敵璇锋潗鏂欙紝鍏朵粬鏉愭枡",
+ annotation3: "鍏紑灞炴�у繀椤诲綍鍏ワ紝涓诲姩鍏紑銆佷緷鐢宠鍏紑銆佸厤浜堝叕寮�",
+ annotation4: "淇濈鏈熼檺:30骞存垨姘镐箙",
+ annotation5: "椤靛彿鎸夌収姝e紡褰曞叆椤电爜涓哄噯"
+ }).toString();
+
+ // 灏濊瘯涓嶅悓鐨凙PI璺緞锛屼互閫傚簲鍙兘鐨勫悗绔疄鐜�
+ const apiUrls = [
+ `${process.env.VUE_APP_BASE_API}/system/records/model?${queryParams}`,
+ `${process.env.VUE_APP_BASE_API}/system/records/model`
+ ];
+
+ let currentUrlIndex = 0;
+
+ const tryNextUrl = () => {
+ if (currentUrlIndex >= apiUrls.length) {
+ reject(new Error('鎵�鏈堿PI璺緞閮借姹傚け璐�'));
+ return;
+ }
+
+ const url = apiUrls[currentUrlIndex];
+ currentUrlIndex++;
+
+ xhr.open('GET', url, true);
+ xhr.setRequestHeader('Authorization', 'Bearer ' + getToken());
+ xhr.responseType = 'blob';
+
+ xhr.onload = () => {
+ if (xhr.status === 200) {
+ // 楠岃瘉杩斿洖鐨勬槸鍚︿负鏈夋晥鐨凚lob
+ if (xhr.response instanceof Blob && xhr.response.size > 0) {
+ resolve(xhr.response);
+ } else {
+ console.warn('杩斿洖鐨勬暟鎹笉鏄湁鏁堢殑Blob锛屽皾璇曚笅涓�涓猆RL');
+ tryNextUrl();
+ }
+ } else if (currentUrlIndex < apiUrls.length) {
+ console.warn(`URL ${url} 璇锋眰澶辫触 (${xhr.status})锛屽皾璇曚笅涓�涓猆RL`);
+ tryNextUrl();
+ } else {
+ reject(new Error(`璇锋眰澶辫触: ${xhr.status} ${xhr.statusText}`));
+ }
+ };
+
+ xhr.onerror = () => {
+ if (currentUrlIndex < apiUrls.length) {
+ console.warn(`URL ${url} 缃戠粶閿欒锛屽皾璇曚笅涓�涓猆RL`);
+ tryNextUrl();
+ } else {
+ reject(new Error('缃戠粶閿欒锛屾棤娉曡幏鍙朎xcel鏂囦欢'));
+ }
+ };
+
+ // 璁剧疆璇锋眰瓒呮椂
+ xhr.timeout = 30000; // 30绉�
+ xhr.ontimeout = () => {
+ if (currentUrlIndex < apiUrls.length) {
+ console.warn(`URL ${url} 璇锋眰瓒呮椂锛屽皾璇曚笅涓�涓猆RL`);
+ tryNextUrl();
+ } else {
+ reject(new Error('璇锋眰瓒呮椂锛屾棤娉曡幏鍙朎xcel鏂囦欢'));
+ }
+ };
+
+ xhr.send();
+ };
+
+ // 寮�濮嬪皾璇曠涓�涓猆RL
+ tryNextUrl();
+ } catch (e) {
+ reject(new Error('XMLHttpRequest璇锋眰澶辫触: ' + e.message));
+ }
+ },
+
+ /** 鎵归噺鎵撳嵃Excel鏂囦欢 */
+ batchPrintExcel() {
+ if (this.ids.length === 0) {
+ this.$modal.msgWarning('璇烽�夋嫨瑕佹墦鍗扮殑璁板綍');
+ return;
+ }
+
+ this.$confirm(`纭畾瑕佹墦鍗伴�変腑鐨� ${this.ids.length} 鏉¤褰曞悧锛焋, '鎵归噺鎵撳嵃纭', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ // 瀵逛簬鎵归噺鎿嶄綔锛屾垜浠彲浠ラ�夋嫨锛�
+ // 1. 濡傛灉鍚庣鏀寔鎵归噺瀵煎嚭锛岀洿鎺ヨ皟鐢ㄦ壒閲忓鍑烘帴鍙�
+ this.$modal.loading('姝e湪鍑嗗鎵归噺鎵撳嵃鏂囦欢锛岃绋嶅��...');
+
+ // 灏濊瘯鎵归噺瀵煎嚭API
+ this.getBatchExcelFile(this.ids).then(blob => {
+ this.$modal.closeLoading();
+ this.handleExcelBlobForPrint(blob, 'batch_records');
+ }).catch(error => {
+ this.$modal.closeLoading();
+ console.warn('鎵归噺瀵煎嚭澶辫触锛屽皾璇曢�愪釜澶勭悊:', error);
+
+ // 2. 濡傛灉鎵归噺瀵煎嚭澶辫触锛屾彁绀虹敤鎴烽�愪釜鎵撳嵃鎴栦笅杞�
+ this.$confirm('鎵归噺鎵撳嵃澶辫触锛屾槸鍚︿笅杞芥墍鏈夋枃浠讹紵', '鎻愮ず', {
+ confirmButtonText: '涓嬭浇',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ // 閫愪釜涓嬭浇鏂囦欢
+ this.downloadMultipleExcelFiles(this.ids);
+ }).catch(() => {});
+ });
+ }).catch(() => {});
+ },
+
+ /** 鑾峰彇鎵归噺Excel鏂囦欢 */
+ getBatchExcelFile(ids) {
+ return new Promise((resolve, reject) => {
+ try {
+ if (typeof axios !== 'undefined') {
+ axios({
+ method: 'get',
+ url: `${process.env.VUE_APP_BASE_API}/system/records/batchExport`,
+ params: { ids: ids.join(',') },
+ responseType: 'blob',
+ headers: { 'Authorization': 'Bearer ' + this.getToken() }
+ }).then(response => {
+ resolve(response.data);
+ }).catch(reject);
+ } else {
+ reject(new Error('鎵归噺瀵煎嚭鍔熻兘涓嶅彲鐢�'));
+ }
+ } catch (e) {
+ reject(e);
+ }
+ });
+ },
+
+ /** 澶勭悊Excel Blob鐢ㄤ簬鎵撳嵃 */
+ handleExcelBlobForPrint(blob, prefix = 'record') {
+ const url = URL.createObjectURL(blob);
+
+ if (this.canPreviewExcelInBrowser()) {
+ const iframe = document.createElement('iframe');
+ iframe.style.display = 'none';
+ document.body.appendChild(iframe);
+
+ iframe.src = url;
+
+ const timeoutId = setTimeout(() => {
+ this.handleExcelPreviewTimeout(url, iframe);
+ }, 5000);
+
+ iframe.onload = () => {
+ clearTimeout(timeoutId);
+ this.$confirm('Excel鏂囦欢宸插噯澶囧ソ锛屾槸鍚︽墦鍗帮紵', '鎵撳嵃纭', {
+ confirmButtonText: '鎵撳嵃',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ try {
+ iframe.contentWindow.print();
+ } catch (e) {
+ this.$modal.msgWarning('鎵撳嵃澶辫触锛屽皢鍦ㄦ柊绐楀彛鎵撳紑鏂囦欢');
+ window.open(url, '_blank');
+ } finally {
+ this.cleanupExcelPreview(iframe, url);
+ }
+ }).catch(() => {
+ window.open(url, '_blank');
+ this.cleanupExcelPreview(iframe, url);
+ });
+ };
+ } else {
+ // 鐩存帴涓嬭浇
+ const link = document.createElement('a');
+ link.href = url;
+ link.download = `${prefix}_${new Date().getTime()}.xlsx`;
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ URL.revokeObjectURL(url);
+ }
+ },
+
+ /** 涓嬭浇澶氫釜Excel鏂囦欢 */
+ downloadMultipleExcelFiles(ids) {
+ // 杩欓噷绠�鍗曞鐞嗕负閫愪釜涓嬭浇
+ // 瀹為檯搴旂敤涓彲鑳介渶瑕佽�冭檻鎬ц兘浼樺寲鎴栦娇鐢ㄥ帇缂╁寘
+ ids.forEach((id, index) => {
+ // 浣跨敤setTimeout閬垮厤娴忚鍣ㄩ檺鍒跺悓鏃朵笅杞�
+ setTimeout(() => {
+ this.getExcelFile(id).then(blob => {
+ const url = URL.createObjectURL(blob);
+ const link = document.createElement('a');
+ link.href = url;
+ link.download = `record_${id}_${new Date().getTime()}.xlsx`;
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ URL.revokeObjectURL(url);
+ });
+ }, index * 1000); // 姣忎釜鏂囦欢闂撮殧1绉掍笅杞�
+ });
+ },
+
+ // /** 鑾峰彇Token鐨勮緟鍔╂柟娉� */
+ // getToken() {
+ // return localStorage.getItem('token') || '';
+ // },
+ /** 瀵煎叆妯℃澘涓嬭浇鎿嶄綔*/
+ handleExportTemplate()
+ {
+ this.download('/system/records/model', {
+
}, `records_${new Date().getTime()}.xlsx`)
+ },
+ handleExportTemplateOther()
+ {
+ this.download('/system/records/modelOther', {
+
+ }, `records_${new Date().getTime()}.xlsx`)
+ },
+ /** 瀵煎叆鎿嶄綔*/
+ async handleImportData({file}){
+ // 妫�鏌ユ枃浠剁被鍨嬫槸鍚︿负xlsx
+ // if (!params.file.name.endsWith('.xlsx')) {
+ // this.$message.error('璇蜂笂浼�.xlsx鏍煎紡鐨勬枃浠�');
+ // return;
+ // }
+ const formData = new FormData();
+ formData.append('excelImport', file);
+ // formData.append('recordId', this.recordId)
+ // alert(this.recordId)
+ console.log(file)
+
+ // 鏄剧ず鍔犺浇涓姸鎬�
+ const loading = this.$loading({
+ lock: true,
+ text: '涓婁紶涓�...',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ });
+
+ enload(formData, {
+ headers: {
+ 'Content-Type': 'multipart/form-data'
}
+ }).then(response => {
+ loading.close();
+ this.$message.success('瀵煎叆鎴愬姛');
+ this.getList();
+ }).catch(error => {
+ loading.close();
+ this.$message.error('瀵煎叆澶辫触: ' + (error.message || '鏈煡閿欒'));
+ });
+
+ }
+
+
+
}
}
</script>
+
+<style scoped>
+/* 鍔犲琛ㄦ牸搴曢儴婊氬姩鏉� */
+::v-deep .el-table__body-wrapper::-webkit-scrollbar {
+ height: 20px; /* 妯悜婊氬姩鏉¢珮搴� */
+}
+
+/* 婊氬姩鏉¤建閬� */
+::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
+ background: #f1f1f1;
+ border-radius: 10px;
+}
+
+/* 婊氬姩鏉℃粦鍧� */
+::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
+ background: #c1c1c1;
+ border-radius: 10px;
+}
+
+/* 婊氬姩鏉℃粦鍧楁偓鍋滄晥鏋� */
+::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
+ background: #2f91ec;
+}
+
+/* Excel鎿嶄綔寮圭獥鏍峰紡 */
+.excel-dialog-overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+}
+
+/* Excel棰勮鍖呰鍣ㄦ牱寮� */
+.excel-preview-wrapper {
+ width: 100%;
+ height: 100%;
+ min-height: 500px;
+ display: flex;
+ flex-direction: column;
+ background: #f9f9f9;
+ border-radius: 8px;
+ padding: 10px;
+ margin-bottom: 20px;
+}
+
+/* Excel閿欒鎻愮ず鏍峰紡 */
+.excel-error-message {
+ background: #fff2f0;
+ border: 1px solid #ffccc7;
+ border-radius: 8px;
+ padding: 20px;
+ margin: 10px 0;
+ color: #f56c6c;
+}
+
+.excel-error-message h3 {
+ margin-top: 0;
+ margin-bottom: 10px;
+ color: #f56c6c;
+ font-size: 16px;
+}
+
+.excel-error-message p {
+ margin: 8px 0;
+ line-height: 1.5;
+}
+
+.excel-error-message ul {
+ text-align: left;
+ margin: 10px 0;
+}
+
+.excel-error-message li {
+ margin: 5px 0;
+ padding-left: 5px;
+}
+
+/* 浼樺寲鎸夐挳鏍峰紡 */
+.excel-dialog-btn.download-btn {
+ background: #67c23a;
+ border-color: #67c23a;
+ color: white;
+ margin-top: 10px;
+}
+
+.excel-dialog-btn.download-btn:hover {
+ background: #85ce61;
+ border-color: #85ce61;
+}
+
+/* 閫夋嫨妗嗗尯鍩熸牱寮� */
+.excel-options-section {
+ background: #f5f7fa;
+ border-radius: 8px;
+ padding: 20px;
+ margin-bottom: 20px;
+}
+
+/* 閫夐」缁勬牱寮� */
+.option-group {
+ margin-bottom: 15px;
+}
+
+.option-group:last-child {
+ margin-bottom: 0;
+}
+
+/* 閫夐」鏍囩鏍峰紡 */
+.option-label {
+ display: flex;
+ align-items: center;
+ font-size: 14px;
+ color: #303133;
+ cursor: pointer;
+ margin-bottom: 10px;
+}
+
+/* 澶嶉�夋鏍峰紡 */
+.option-label input[type="checkbox"] {
+ width: 16px;
+ height: 16px;
+ margin-right: 8px;
+ cursor: pointer;
+}
+
+/* 娉ㄨВ閫夐」瀹瑰櫒 */
+.annotation-options {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 15px;
+ margin-top: 10px;
+}
+
+/* 娉ㄨВ澶嶉�夋鏍峰紡 */
+.annotation-checkbox {
+ display: flex;
+ align-items: center;
+ font-size: 14px;
+ color: #303133;
+ cursor: pointer;
+ background: white;
+ padding: 8px 12px;
+ border-radius: 4px;
+ border: 1px solid #dcdfe6;
+ transition: all 0.3s;
+}
+
+.annotation-checkbox:hover {
+ border-color: #c0c4cc;
+ background: #fafafa;
+}
+
+.annotation-checkbox input[type="checkbox"] {
+ width: 14px;
+ height: 14px;
+ margin-right: 6px;
+ cursor: pointer;
+}
+.excel-dialog {
+ background-color: white;
+ border-radius: 8px;
+ width: 96%;
+ max-width: 900px;
+ max-height: 100vh;
+ overflow: hidden;
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
+ animation: slideUp 0.3s ease;
+ display: flex;
+ flex-direction: column;
+}
+
+.excel-dialog-header {
+ padding: 20px 24px;
+ border-bottom: 1px solid #e9ecef;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ background-color: #f8f9fa;
+}
+
+.excel-dialog-header h3 {
+ margin: 0;
+ font-size: 18px;
+ font-weight: 600;
+ color: #333;
+}
+
+.excel-dialog-close {
+ background: none;
+ border: none;
+ font-size: 24px;
+ cursor: pointer;
+ color: #666;
+ width: 32px;
+ height: 32px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 4px;
+ transition: all 0.2s;
+}
+
+.excel-dialog-close:hover {
+ background-color: #e9ecef;
+ color: #333;
+}
+
+.excel-dialog-body {
+ padding: 24px;
+ flex: 1;
+ overflow-y: auto;
+}
+
+.excel-preview-container {
+ width: 100%;
+ height: 400px;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ margin-bottom: 16px;
+ position: relative;
+ background-color: #f8f9fa;
+ overflow: hidden;
+}
+
+.loading-indicator {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background-color: rgba(255, 255, 255, 0.9);
+ color: #666;
+ z-index: 10;
+}
+
+.loading-spinner {
+ width: 40px;
+ height: 40px;
+ border: 3px solid #f3f3f3;
+ border-top: 3px solid #2f91ec;
+ border-radius: 50%;
+ animation: spin 1s linear infinite;
+ margin-bottom: 10px;
+}
+
+.excel-dialog-tip {
+ margin: 0;
+ color: #666;
+ text-align: center;
+ font-size: 14px;
+}
+
+.excel-dialog-footer {
+ padding: 16px 24px;
+ border-top: 1px solid #e9ecef;
+ display: flex;
+ justify-content: center;
+ gap: 16px;
+ background-color: #f8f9fa;
+}
+
+.excel-dialog-btn {
+ padding: 10px 24px;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+ font-size: 14px;
+ font-weight: 500;
+ transition: all 0.2s;
+ min-width: 100px;
+}
+
+.preview-btn {
+ background-color: #2f91ec;
+ color: white;
+}
+
+.preview-btn:hover {
+ background-color: #1c7ed6;
+ transform: translateY(-1px);
+ box-shadow: 0 2px 8px rgba(47, 145, 236, 0.3);
+}
+
+.print-btn {
+ background-color: #20c997;
+ color: white;
+}
+
+.print-btn:hover {
+ background-color: #17a589;
+ transform: translateY(-1px);
+ box-shadow: 0 2px 8px rgba(32, 201, 151, 0.3);
+}
+
+.download-btn {
+ background-color: #6c757d;
+ color: white;
+}
+
+.download-btn:hover {
+ background-color: #5a6268;
+ transform: translateY(-1px);
+ box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
+}
+
+@keyframes fadeIn {
+ from { opacity: 0; }
+ to { opacity: 1; }
+}
+
+@keyframes slideUp {
+ from {
+ opacity: 0;
+ transform: translateY(20px);
+ }
+ to {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+@keyframes spin {
+ 0% { transform: rotate(0deg); }
+ 100% { transform: rotate(360deg); }
+}
+</style>
--
Gitblit v1.9.1