From 6429b95aa66bfbb214bcadb248b8b7ca5e754368 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期日, 18 一月 2026 23:17:41 +0800
Subject: [PATCH] 修改相关代码

---
 src/views/archiveManager/archiveMaterial/index.vue |  438 ++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 305 insertions(+), 133 deletions(-)

diff --git a/src/views/archiveManager/archiveMaterial/index.vue b/src/views/archiveManager/archiveMaterial/index.vue
index 08ceddc..c2b232c 100644
--- a/src/views/archiveManager/archiveMaterial/index.vue
+++ b/src/views/archiveManager/archiveMaterial/index.vue
@@ -1,6 +1,8 @@
 <template>
     <div class="app-container">
-         <h2 class="title-border">娣诲姞妗堝嵎璇︾粏璁板綍</h2>
+
+      <div v-if="sho">
+         <h2 class="title-border">娣诲姞妗堝嵎璇︾粏璁板綍   {褰撳墠褰曞叆浜唟{total}}鏉  {褰撳墠妗e彿涓猴細 {{recordStrId}} } {褰撳墠鏂囧彿涓猴細 {{inquiryNumber}} }  </h2>
  <el-form ref="form" :model="form" :rules="rules" label-width="100px">
 
    <el-row>
@@ -16,22 +18,24 @@
           <el-form-item label="璐d换鑰�" prop="creator">
             <div class="title-search-wrapper">
               <el-input
+                type="textarea"
+                rows="2"
+                    v-auto-height="{ minRows: 2, maxRows: 10 }"
                 v-model="form.creator"
                 placeholder="璇疯緭鍏ヨ矗浠昏��"
-                @input="handleCreatorInput"
-                @focus="showCreatorSuggestions = true"
-                @blur="handleCreatorBlur"
+                  @focus="(e) => e.target.select()"
+
               />
               <!-- 涓嬫媺寤鸿妗� -->
               <div
-                v-if="showCreatorSuggestions && creatorSuggestions.length > 0"
+                v-if="showCreatorSuggestions && creatorSuggestions.length > 0 && false"
                 class="title-suggestions"
               >
                 <div
                   v-for="(item, index) in creatorSuggestions"
                   :key="index"
                   class="suggestion-item"
-                  @mousedown="selectCreatorSuggestion(item)"
+                  @mousedown.prevent="selectCreatorSuggestion(item)"
                 >
                   {{ item }}
                 </div>
@@ -46,15 +50,15 @@
           <el-form-item label="鏂囦欢棰樺悕" prop="title">
             <div class="title-search-wrapper">
               <el-input
+                type="textarea"
+                rows="2"
                 v-model="form.title"
                 placeholder="璇疯緭鍏ユ枃浠堕鍚�"
-                @input="handleTitleInput"
-                @focus="showTitleSuggestions = true"
-                @blur="handleTitleBlur"
+                @focus="(e) => e.target.select()"
               />
               <!-- 涓嬫媺寤鸿妗� -->
               <div
-                v-if="showTitleSuggestions && titleSuggestions.length > 0"
+                v-if="showTitleSuggestions && titleSuggestions.length > 0  && false"
                 class="title-suggestions"
               >
                 <div
@@ -234,7 +238,7 @@
 
         </div>
 
-
+</div>
 
 <div class="title-border"></div>
 
@@ -255,6 +259,7 @@
         </el-col>
         <el-col :span="1.5">
           <el-button
+          v-if="sho"
             type="success"
             plain
             icon="el-icon-edit"
@@ -263,6 +268,17 @@
             @click="handleUpdate"
             v-hasPermi="['system:materials:edit']"
           >淇敼</el-button>
+        </el-col>
+           <el-col :span="1.5">
+          <el-button
+            type="warning"
+            plain
+            icon="el-icon-download"
+            size="mini"
+            @click="handleExportDir"
+            v-hasPermi="['system:materials:list']"
+
+          >瀵煎嚭鍗峰唴鐩綍</el-button>
         </el-col>
         <el-col :span="1.5">
           <el-button
@@ -273,10 +289,11 @@
             @click="handleExport"
             v-hasPermi="['system:materials:list']"
 
-          >瀵煎嚭</el-button>
+          >瀵煎嚭鐢靛瓙鏂囦欢鐩綍</el-button>
         </el-col>
         <el-col :span="1.5">
           <el-button
+          v-if="sho"
             type="danger"
             plain
             icon="el-icon-delete"
@@ -287,42 +304,7 @@
           >鍒犻櫎</el-button>
         </el-col>
 
-          <el-col :span="1.5">
-          <el-button
-            type="success"
-            plain
-            icon="el-icon-edit"
-            size="mini"
-            @click="handleImport"
-            v-hasPermi="['system:materials:edit']"
-          >鍏ㄩ儴闄勪欢瀵煎叆</el-button>
 
-
-            <!-- 鍦ㄦ寜閽笅鏂规坊鍔犲鍏ュ璇濇 -->
-  <el-dialog title="鎵归噺瀵煎叆闄勪欢" :visible.sync="importDialogVisible" width="50%">
-    <el-upload
-      class="upload-demo"
-      ref="upload"
-      :action="uploadUrl"
-      :headers="headers"
-      :data="uploadParams"
-      :on-success="handleSuccess"
-      :on-error="handleError"
-      :on-preview="handlePreview"
-      :on-remove="handleRemove"
-      :file-list="fileList"
-        :on-change="handleFileChange"
-      :auto-upload="false"
-      multiple
-      accept=".jpg,.png"
-    >
-      <el-button slot="trigger" size="small" type="primary">閫夋嫨鏂囦欢</el-button>
-      <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">涓婁紶鍒版湇鍔″櫒</el-button>
-      <el-button style="margin-left: 10px;" size="small" type="danger" @click="clearFileList">娓呯┖鍒楄〃</el-button>
-      <div slot="tip" class="el-upload__tip">鍙笂浼燡PG绛夋牸寮忔枃浠讹紝鍗曚釜鏂囦欢涓嶈秴杩�50MB</div>
-    </el-upload>
-  </el-dialog>
-        </el-col>
         <el-col :span="1.5">
         <el-button
           type="warning"
@@ -334,7 +316,7 @@
         >瀵煎叆妯℃澘涓嬭浇</el-button>
       </el-col>
 
-        <el-col :span="1.5">
+        <el-col      v-if="sho" :span="1.5">
 
         <el-upload
           action=""
@@ -351,12 +333,50 @@
 
         </el-upload>
       </el-col>
+      <el-col :span="1.5">
+              <el-button
+              v-if="sho"
+                type="success"
+                plain
+                icon="el-icon-edit"
+                size="mini"
+                @click="handleImport"
+                v-hasPermi="['system:materials:edit']"
+              >鍏ㄩ儴闄勪欢瀵煎叆</el-button>
+              宸茬粡涓婁紶浜� {{this.fileCut}} 寮犻檮浠讹紝杩樿涓婁紶 {{this.totalPageCount-this.fileCut}} 寮犻檮浠�
+
+
+                <!-- 鍦ㄦ寜閽笅鏂规坊鍔犲鍏ュ璇濇 -->
+      <el-dialog title="鎵归噺瀵煎叆闄勪欢" :visible.sync="importDialogVisible" width="50%">
+        <el-upload
+          class="upload-demo"
+          ref="upload"
+          :action="uploadUrl"
+          :headers="headers"
+          :data="uploadParams"
+          :on-success="handleSuccess"
+          :on-error="handleError"
+          :on-preview="handlePreview"
+          :on-remove="handleRemove"
+          :file-list="fileList"
+            :on-change="handleFileChange"
+          :auto-upload="false"
+          multiple
+          accept=".jpg,.png"
+        >
+          <el-button slot="trigger" size="small" type="primary">閫夋嫨鏂囦欢</el-button>
+          <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">涓婁紶鍒版湇鍔″櫒</el-button>
+          <el-button style="margin-left: 10px;" size="small" type="danger" @click="clearFileList">娓呯┖鍒楄〃</el-button>
+          <div slot="tip" class="el-upload__tip">鍙笂浼燡PG绛夋牸寮忔枃浠讹紝鍗曚釜鏂囦欢涓嶈秴杩�50MB</div>
+        </el-upload>
+      </el-dialog>
+            </el-col>
         <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
       </el-row>
 
       <el-table v-loading="loading" :data="materialsList" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" align="center" />
-        <el-table-column label="鎿嶄綔" align="center" width="160" class-name="small-padding ">
+        <el-table-column v-if="sho" label="鎿嶄綔" align="center" width="160" class-name="small-padding ">
               <template slot-scope="scope">
                 <el-button
                   size="mini"
@@ -382,19 +402,19 @@
               </template>
             </el-table-column>
                 <el-table-column label="鏂囦欢鏉愭枡搴忓彿" align="center" prop="fileNumber" />
-        <el-table-column label="鏂囦欢缂栧彿" align="center" prop="documentNumber" />
+        <el-table-column label="鏂囦欢缂栧彿" align="center" prop="documentNumber" width="180"/>
 
-        <el-table-column label="璐d换鑰�" align="center" prop="creator" />
-        <el-table-column label="鏂囦欢棰樺悕" align="center" prop="title" />
+        <el-table-column label="璐d换鑰�" align="center" prop="creator" width="180"/>
+        <el-table-column label="鏂囦欢棰樺悕" align="center" prop="title" width="220"/>
         <el-table-column label="鏃ユ湡" align="center" prop="date" width="180">
           <template slot-scope="scope">
             <span>{{ parseTime(scope.row.date, '{y}-{m}-{d}') }}</span>
           </template>
         </el-table-column>
         <el-table-column label="椤靛彿" sortable align="center" prop="pageNumber"  />
-        <el-table-column label="澶囨敞" align="center" prop="remarks" />
-                <el-table-column label="椤垫" sortable align="center" prop="pageOrder"  />
-
+        <el-table-column label="澶囨敞" align="center" prop="remarks" width="180"/>
+            <!--          <el-table-column label="椤垫" sortable align="center" prop="pageOrder"  />
+--->
         <el-table-column label="鎵�澶勯樁娈�" sortable align="center" width="180" prop="stage" />
         <el-table-column label="鍏紑灞炴��" sortable align="center" width="180" prop="publicity" />
         <el-table-column label="鏄惁涓洪檮鍥惧強闄勪欢" align="center" prop="isAttachment" />
@@ -405,13 +425,13 @@
 
         <el-table-column label="鏄惁娑夊瘑鍙婃晱鎰熶俊鎭�" align="center" prop="isSensitive" />
         <el-table-column label="鏄惁娉ㄩ攢" align="center" prop="isCanceled" />
-        <el-table-column label="鏍煎紡" align="center" prop="format" />
+     <!--   <el-table-column label="鏍煎紡" align="center" prop="format" />
         <el-table-column label="骞呴潰" align="center" prop="sizeType" />
         <el-table-column label="姘村钩鍒嗚鲸鐜�" align="center" prop="horizontalResolution" />
         <el-table-column label="鍨傜洿鍒嗚鲸鐜�" align="center" prop="verticalResolution" />
         <el-table-column label="瀹藉害" align="center" prop="width" />
         <el-table-column label="楂樺害" align="center" prop="height" />
-        <el-table-column label="澶у皬" align="center" prop="fileSize" />
+        <el-table-column label="澶у皬" align="center" prop="fileSize" /> -->
         <el-table-column label="闄勪欢鍙婂巻鍙插彂鏂囧彿" align="center" prop="attachmentHistoryNumbers" />
 
 
@@ -439,13 +459,13 @@
            <el-row>
            <el-col :span="16">
                <el-form-item label="璐d换鑰�" prop="creator">
-                   <el-input v-model="forms.creator" placeholder="璇疯緭鍏ヨ矗浠昏��" />
+                   <el-input type="textarea" rows="1" v-model="forms.creator" placeholder="璇疯緭鍏ヨ矗浠昏��" />
                  </el-form-item>
            </el-col>
 
            </el-row>
            <el-form-item label="鏂囦欢棰樺悕" prop="title">
-             <el-input v-model="forms.title" placeholder="璇疯緭鍏ユ枃浠堕鍚�" />
+             <el-input type="textarea" rows="1" v-model="forms.title" placeholder="璇疯緭鍏ユ枃浠堕鍚�" />
            </el-form-item>
                  <el-form-item label="鏃ユ湡" prop="date">
                   <el-input v-model="forms.date" placeholder="璇疯緭鍏ユ棩鏈� (鏍煎紡锛歽yyy-mm-dd)" style="width: 200px;" />
@@ -462,9 +482,9 @@
     <el-form-item label="鏉愭枡绫诲瀷" prop="fileStyle">
           <el-select
             v-model="forms.fileStyle"
-
             placeholder="璇烽�夋嫨鏉愭枡绫诲瀷"
             clearable
+            @change="handleFileStyleChange2"
           >
             <el-option
               v-for="item in fileStyleOptions"
@@ -474,7 +494,7 @@
             />
           </el-select>
         </el-form-item>
-     <el-form-item label="椤靛彿" prop="pageNumber">
+     <el-form-item label="椤靛彿" prop="pageNumber" v-if="forms.fileStyle !== '鍏朵粬鏉愭枡'">
         <el-col :span="8">
           <el-input
             v-model.number="forms.pageNumber"
@@ -633,14 +653,6 @@
           value-format="yyyy-MM-dd"
           placeholder="璇烽�夋嫨鏃ユ湡">
         </el-date-picker> -->
-      </el-form-item>
-      <el-form-item label="妗f鍙�" prop="fileNumber">
-        <el-input
-          v-model="queryParams.fileNumber"
-          placeholder="璇疯緭鍏ユ。妗堝彿锛堟敮鎸佽寖鍥存悳绱紝濡傦細B1.3-05-2024-0001~0003锛�"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
       </el-form-item>
     <!--  <el-form-item label="椤靛彿" prop="pageNumber">
         <el-col :span="8">
@@ -802,10 +814,17 @@
 import { updateStatusById } from "@/api/system/records"
 
 import {delArchiverecordstouserByReIdAndUid} from "@/api/system/archiverecordstouser"
+
+
+
   export default {
     name: "Materials",
     data() {
       return {
+        //闄勪欢鏁伴噺
+        fileCut: 0,
+        //鏄惁鏄剧ず鐩稿叧鍐呭
+        sho: true,
         totalPageCount: 0,
         // 璁板綍鍏冪礌鍒濆浣嶇疆鍜岀姸鎬�
   originalOffsetLeft: 0,
@@ -814,13 +833,17 @@
 
        importDialogVisible: false,
       fileList: [],
-      uploadUrl:  process.env.VUE_APP_BASE_API +'/system/materials/upload/'+this.recordId, // 鏇挎崲涓哄疄闄呯殑涓婁紶鎺ュ彛
+      uploadUrl:  process.env.VUE_APP_BASE_API +'/system/materials/uploads/'+this.recordId, // 鏇挎崲涓哄疄闄呯殑涓婁紶鎺ュ彛
            headers: {
         Authorization: 'Bearer ' + getToken()
       },
       uploadParams: {
         type: 'material' // 鑷畾涔変笂浼犵被鍨�
       },
+      // 涓婁紶鐘舵�佽窡韪�
+      uploadSuccessCount: 0,
+      uploadFailCount: 0,
+      totalUploadFiles: 0,
       // 娣诲姞鏉愭枡绫诲瀷閫夐」
       fileStyleOptions: [
           { value: '鏂囧瓧鏉愭枡', label: '鏂囧瓧鏉愭枡' },
@@ -865,6 +888,8 @@
           { value: '06-涓氬姟鏁版嵁', label: '06-涓氬姟鏁版嵁' },
         ],
         recordId: null,
+        inquiryNumber: '',
+        recordStrId: '',
         // 閬僵灞�
         loading: true,
         // 閫変腑鏁扮粍
@@ -949,6 +974,14 @@
             { required: true, message: "椤靛彿涓嶈兘涓虹┖", trigger: "blur" },
             { type: 'number', message: '椤靛彿蹇呴』涓烘暟瀛楃被鍨�', trigger: ['blur', 'change'] },
             { pattern: /^[1-9]\d*$/, message: '璇疯緭鍏ュぇ浜�0鐨勬鏁存暟', trigger: 'blur' },
+            { validator: (rule, value, callback) => {
+                if (this.totalPageCount > 0 && value > this.totalPageCount) {
+                  callback(new Error(`椤靛彿涓嶈兘瓒呰繃鎬婚〉鏁�${this.totalPageCount}`));
+                } else {
+                  callback();
+                }
+              }, trigger: ['blur', 'change']
+            },
             // { max: 85, message: "鏈�澶ч暱搴︿负85涓瓧绗�", trigger: "blur" }
           ],
           stage: [
@@ -1001,12 +1034,18 @@
     created() {
       //const roleId = this.$route.params && this.$route.params.roleId
       const recordId = this.$route.params && this.$route.params.recordId
-
+      this.recordStrId = this.$route.params && this.$route.params.recordStrId
+      this.inquiryNumber = this.$route.params && this.$route.params.inquiryNumber
       this.totalPageCount = this.$route.params && this.$route.params.pageCount
+
+      this.sho = this.$route.params && this.$route.params.sho
+      // 灏嗗瓧绗︿覆杞崲涓哄竷灏斿��
+      this.sho = this.sho === true || this.sho === "true"
+
       //alert(this.totalPageCount)
       //alert(recordId)
       this.recordId = recordId;
-      this.uploadUrl = process.env.VUE_APP_BASE_API +'/system/materials/upload/'+this.recordId
+      this.uploadUrl = process.env.VUE_APP_BASE_API +'/system/materials/uploads/'+this.recordId
 // alert('Bearer ' + getToken())
       this.reset()
       this.form.securityLevel = '鏅��' // 璁剧疆瀵硅瘽妗嗚〃鍗曢粯璁ゅ��
@@ -1019,40 +1058,108 @@
 
         this.queryParams.recordId = recordId
         this.getList()
+        getFileCount(recordId).then(response=>{
+          this.fileCut = response.length
+         // alert(this.fileCut)
+        })
       }
     },
     methods: {
+    handleTabKey (event) {
+     // 榛樿琛屼负
+     event.preventDefault()
+
+     // 鎵嬪姩鍏ㄩ��
+     const textarea = event.target
+     textarea.select()
+
+     // 濡傛灉闇�瑕佸垏鎹㈠埌涓嬩竴涓厓绱狅紝鍙互鎵嬪姩瑙﹀彂
+     // const focusableElements = getFocusableElements()
+     // moveFocusToNextElement()
+   },
+      // 杈撳叆浜嬩欢锛堢ず渚嬶細鍙牴鎹緭鍏ュ唴瀹硅繃婊ゅ缓璁垪琛級
+          handleCreatorInput(val) {
+            // 閲嶇疆閫変腑绱㈠紩
+            this.selectedIndex = -1;
+            // 杩欓噷鏇挎崲鎴愪綘鐨勫疄闄呭缓璁垪琛ㄨ幏鍙栭�昏緫
+            // this.creatorSuggestions = ['寮犱笁', '鏉庡洓', '鐜嬩簲', '璧靛叚'].filter(item =>
+            //   item.includes(val)
+            // );
+          },
+          // 涓婃柟鍚戦敭閫昏緫
+          handleKeyUp() {
+            if (!this.showCreatorSuggestions || this.creatorSuggestions.length === 0) return;
+            // 鍚戜笂鍒囨崲锛屽埌椤跺垯鍥炲埌鏈�鍚庝竴椤�
+            this.selectedIndex = this.selectedIndex <= 0
+              ? this.creatorSuggestions.length - 1
+              : this.selectedIndex - 1;
+          },
+          // 涓嬫柟鍚戦敭閫昏緫
+          handleKeyDown() {
+            if (!this.showCreatorSuggestions || this.creatorSuggestions.length === 0) return;
+            // 鍚戜笅鍒囨崲锛屽埌搴曞垯鍥炲埌绗竴椤�
+            this.selectedIndex = this.selectedIndex >= this.creatorSuggestions.length - 1
+              ? 0
+              : this.selectedIndex + 1;
+          },
+          // 鍥炶溅閫変腑褰撳墠楂樹寒椤�
+          handleKeyEnter() {
+            if (this.selectedIndex >= 0 && this.selectedIndex < this.creatorSuggestions.length) {
+              this.selectCreatorSuggestion(this.creatorSuggestions[this.selectedIndex]);
+            }
+          },
         // 涓婁紶澶辫触鍥炶皟
     handleError(err, file, fileList) {
-      this.$modal.msgError("涓婁紶澶辫触: " + err.message)
-       // 娓呴櫎涓婁紶鍒楄〃
-  this.$refs.upload.clearFiles();
+      // 澶辫触璁℃暟+1
+      this.uploadFailCount++;
+      // 妫�鏌ユ槸鍚︽墍鏈夋枃浠堕兘涓婁紶瀹屾垚
+      this.checkUploadComplete();
     },
           // 涓婁紶鎴愬姛鍥炶皟
     handleSuccess(response, file, fileList) {
       if (response.code === 200) {
-        this.$modal.msgSuccess("涓婁紶鎴愬姛")
- // 娓呴櫎涓婁紶鍒楄〃
-  this.$refs.upload.clearFiles();
-  // 鍏抽棴涓婁紶瀵硅瘽妗�
-  this.importDialogVisible = false;
-        // 鍒锋柊鍒楄〃鏁版嵁
-        this.getList();        // 杩欓噷鍙互璋冪敤鎺ュ彛鍏宠仈涓婁紶鐨勬枃浠跺拰褰撳墠璁板綍
-        //鏇存柊妗f鐨勭姸鎬�
-
+        // 鎴愬姛璁℃暟+1
+        this.uploadSuccessCount++;
       } else {
-        // alert(234)
-        console.log(response)
-        this.$modal.msgError(response.msg)
+        // 澶辫触璁℃暟+1
+        this.uploadFailCount++;
+      }
+      // 妫�鏌ユ槸鍚︽墍鏈夋枃浠堕兘涓婁紶瀹屾垚
+      this.checkUploadComplete();
+    },
+    // 妫�鏌ユ墍鏈夋枃浠舵槸鍚︿笂浼犲畬鎴�
+    checkUploadComplete() {
+      // 褰撴墍鏈夋枃浠堕兘涓婁紶瀹屾垚鏃�
+      if (this.uploadSuccessCount + this.uploadFailCount === this.totalUploadFiles) {
+        if (this.uploadFailCount === 0) {
+          // 鎵�鏈夋枃浠朵笂浼犳垚鍔�
+          this.$modal.msgSuccess("鎵�鏈夋枃浠朵笂浼犳垚鍔�");
+        } else {
+          // 閮ㄥ垎鏂囦欢涓婁紶澶辫触
+          this.$modal.msgError(`涓婁紶瀹屾垚锛屼絾鏈� ${this.uploadFailCount} 涓枃浠朵笂浼犲け璐);
+        }
+        // 娓呴櫎涓婁紶鍒楄〃
+        this.$refs.upload.clearFiles();
+        // 鍏抽棴涓婁紶瀵硅瘽妗�
+        this.importDialogVisible = false;
+      //  alert(123)
+        // 鍒锋柊鍒楄〃鏁版嵁
+        getFileCount(this.recordId).then(response=>{
+          this.fileCut = response.length
+    //      alert(98)
+         // alert(this.fileCut)
+         this.getList();
+        })
+
       }
     },
-       // 鎵撳紑瀵煎叆瀵硅瘽妗�
+     // 鎵撳紑瀵煎叆瀵硅瘽妗�
     handleImport() {
       //鐢熸垚鏂扮殑璁板綍
-      insertFile(this.recordId, this.totalPageCount).then(response => {
-        console.log(response)
-      //  alert(3245)
-        })
+      // insertFile(this.recordId, this.totalPageCount).then(response => {
+      //   console.log(response)
+      // //  alert(3245)
+      //   })
       this.importDialogVisible = true
     },
     // 鏂囦欢绉婚櫎
@@ -1075,6 +1182,7 @@
         this.$modal.msgWarning('璇峰厛閫夋嫨鏂囦欢鍐嶄笂浼�')
         return
       }
+
      // alert(this.recordId)
 
 
@@ -1084,16 +1192,47 @@
      //   var res = response.data.res
      //  console.log(res)
        //alert(response.data.total)
-       if(fileCount!=this.totalPageCount)
+       // if(fileCount!=this.totalPageCount)
+       // {
+       //   this.$modal.msgWarning('璇烽�夋嫨涓庤褰曟暟涓�鑷寸殑鏂囦欢')
+       //   return
+       // }
+     //  else
        {
-         this.$modal.msgWarning('璇烽�夋嫨涓庤褰曟暟涓�鑷寸殑鏂囦欢')
-         return
-       }
-       else
-       {
+
+         // 瀹氫箟鍏佽鐨勬渶澶у��
+         const maxValue = this.totalPageCount;
+
+         // 杩囨护fileList鏁扮粍锛屼繚鐣欐暟瀛楅儴鍒嗕笉瓒呰繃maxValue鐨勫厓绱�
+         this.fileList = this.fileList.filter(item => {
+          // 姝ラ1锛氭娴嬫槸鍚﹀寘鍚腑鏂囷紙[\u4e00-\u9fa5]鏄腑鏂囩殑Unicode鑼冨洿锛�
+             const hasChinese = /[\u4e00-\u9fa5]/.test(item.name);
+             // 鏈変腑鏂囩洿鎺ヨ繑鍥瀎alse锛屽垹闄よ鍏冪礌
+             if (hasChinese) return false;
+
+           // 姝ラ1锛氭彁鍙杗ame涓殑绾暟瀛楅儴鍒�
+           // 姝e垯琛ㄨ揪寮忚В閲婏細\d+ 鍖归厤涓�涓垨澶氫釜鏁板瓧
+           const numStr = item.name.match(/\d+/);
+
+           // 澶勭悊娌℃湁鏁板瓧鐨勬儏鍐碉紙杩斿洖false锛屼細琚繃婊ゆ帀锛�
+           if (!numStr) return false;
+
+           // 姝ラ2锛氬皢鏁板瓧瀛楃涓茶浆涓烘暟瀛�
+           const num = parseInt(numStr[0], 10);
+
+           // 姝ラ3锛氬垽鏂槸鍚﹀皬浜庣瓑浜庢渶澶у��
+           return num <= maxValue;
+         });
+
+
+         // 鍒濆鍖栦笂浼犵姸鎬佽鏁�
+         this.uploadSuccessCount = 0;
+         this.uploadFailCount = 0;
+         this.totalUploadFiles = fileCount;
          // 鎵ц涓婁紶
+         console.log(this.fileList)
            this.$refs.upload.submit()
-           this.getList()
+      //     this.getList()
        }
        // else
        // {
@@ -1131,24 +1270,10 @@
       /** 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛� */
       getList() {
         this.loading = true
-
-        // 澶勭悊妗f鍙锋悳绱㈤�昏緫锛屽寘鎷寖鍥存悳绱�
-        const queryParams = { ...this.queryParams }
-
-        // 妫�鏌ユ槸鍚﹀寘鍚寖鍥存悳绱㈢鍙�
-        if (queryParams.fileNumber && queryParams.fileNumber.includes('~')) {
-          const rangeParts = queryParams.fileNumber.split('~')
-          if (rangeParts.length === 2) {
-            // 瑙f瀽鑼冨洿鎼滅储鍙傛暟
-            // 淇濈暀鍘熷fileNumber鐢ㄤ簬鍏朵粬澶勭悊
-            queryParams.fileNumberStart = rangeParts[0].trim()
-            queryParams.fileNumberEnd = rangeParts[1].trim()
-          }
-        }
-
-        listMaterials(queryParams).then(response => {
+        listMaterials(this.queryParams).then(response => {
           console.log(response)
-          this.materialsList = response.data.data
+          // 杩囨护鎺塿isible涓�0鐨勮褰�
+          this.materialsList = response.data.data.filter(item => item.visible !== 0)
           this.total = response.data.total
           this.loading = false
         })
@@ -1295,6 +1420,16 @@
       selectCreatorSuggestion(creator) {
         this.form.creator = creator;
         this.showCreatorSuggestions = false;
+        // 鎵嬪姩瑙﹀彂 input 浜嬩欢锛岀‘淇濊〃鍗曢獙璇佺瓑閫昏緫姝e父
+            this.$nextTick(() => {
+              const inputElement = this.$el.querySelector('textarea');
+              if (inputElement) {
+                inputElement.focus();
+                // 灏嗗厜鏍囧畾浣嶅埌鏂囨湰鏈熬
+                const length = inputElement.value.length;
+                inputElement.setSelectionRange(length, length);
+              }
+            });
       },
 
       // 澶勭悊鏉愭枡绫诲瀷鍙樺寲
@@ -1302,6 +1437,13 @@
         // 褰撻�夋嫨'鍏朵粬鏉愭枡'鏃讹紝娓呯┖椤电爜瀛楁
         if (value === '鍏朵粬鏉愭枡') {
           this.form.pageNumber = null;
+        }
+      },
+      // 澶勭悊鏉愭枡绫诲瀷鍙樺寲锛堜慨鏀硅〃鍗曪級
+      handleFileStyleChange2(value) {
+        // 褰撻�夋嫨'鍏朵粬鏉愭枡'鏃讹紝灏嗛〉鍙疯缃负0
+        if (value === '鍏朵粬鏉愭枡') {
+          this.forms.pageNumber = null;
         }
       },
 
@@ -1381,6 +1523,10 @@
         const materialId = row.materialId || this.ids
         getMaterials(materialId).then(response => {
           this.forms = response.data
+          // 濡傛灉鏉愭枡绫诲瀷鏄�"鍏朵粬鏉愭枡"锛屽皢椤靛彿璁剧疆涓�0
+          if (this.forms.fileStyle === '鍏朵粬鏉愭枡') {
+            this.forms.pageNumber = null;
+          }
           this.open = true
           this.title = "淇敼妗堝嵎璇︾粏淇℃伅"
         })
@@ -1457,14 +1603,14 @@
 
           // 淇濆瓨鎴愬姛鍚庯紝鍏夋爣璺冲洖鏂囦欢缂栧彿杈撳叆妗�
           this.$nextTick(() => {
-            this.$refs.documentNumberInput.focus();
+            this.$refs.documentNumberInput.select();
           });
           this.getList()
-        })
-        }
-        else
-        {
-          this.$message.error('璇峰~鍐欐墍鏈夊繀濉瓧娈�');
+          })
+          }
+          else
+          {
+            this.$message.error('璇峰~鍐欐墍鏈夊繀濉瓧娈�');
 
         }
         })
@@ -1476,10 +1622,7 @@
             if (this.forms.materialId != null) {
               updateMaterials(this.forms).then(response => {
                 this.$modal.msgSuccess("淇敼鎴愬姛")
-                // 淇敼鎴愬姛鍚庯紝鍏夋爣璺冲洖鏂囦欢缂栧彿杈撳叆妗�
-                this.$nextTick(() => {
-                  this.$refs.documentNumberInput.focus();
-                });
+
                 this.open = false
                 this.getList()
               })
@@ -1499,6 +1642,26 @@
           this.$modal.msgSuccess("鍒犻櫎鎴愬姛")
         }).catch(() => {})
       },
+           /** 瀵煎嚭鎸夐挳鎿嶄綔 - 鏀寔瀵煎嚭閫変腑琛屾垨鍏ㄩ儴鏁版嵁 */
+      handleExportDir() {
+        // 鍒ゆ柇鏄惁鏈夐�変腑鐨勮
+        if (this.ids && this.ids.length > 0) {
+          // 鏄剧ず瀵煎嚭閫変腑琛岀殑鎻愮ず
+          this.$message.info(`姝e湪瀵煎嚭${this.ids.length}鏉¢�変腑鐨勬暟鎹�...`);
+          // 瀵煎嚭閫変腑鐨勮鏁版嵁
+          this.download('system/materials/exportDir', {
+            ids: this.ids.join(','),
+         //   exportType: 'selected'
+          }, `materiaDir_selected_${new Date().getTime()}.xls`)
+        } else {
+          // 鏄剧ず瀵煎嚭鍏ㄩ儴鏁版嵁鐨勬彁绀�
+          this.$message.info('姝e湪瀵煎嚭绗﹀悎褰撳墠鏌ヨ鏉′欢鐨勬墍鏈夋暟鎹�...');
+          // 娌℃湁閫変腑琛屾椂锛屽鍑哄綋鍓嶆煡璇㈡潯浠剁殑鏁版嵁
+          this.download('system/materials/exportDir', {
+            ...this.queryParams
+          }, `materiaDir_${new Date().getTime()}.xls`)
+        }
+      },
       /** 瀵煎嚭鎸夐挳鎿嶄綔 - 鏀寔瀵煎嚭閫変腑琛屾垨鍏ㄩ儴鏁版嵁 */
       handleExport() {
         // 鍒ゆ柇鏄惁鏈夐�変腑鐨勮
@@ -1509,14 +1672,14 @@
           this.download('system/materials/export', {
             ids: this.ids.join(','),
          //   exportType: 'selected'
-          }, `materials_selected_${new Date().getTime()}.xlsx`)
+          }, `materials_selected_${new Date().getTime()}.xls`)
         } else {
           // 鏄剧ず瀵煎嚭鍏ㄩ儴鏁版嵁鐨勬彁绀�
           this.$message.info('姝e湪瀵煎嚭绗﹀悎褰撳墠鏌ヨ鏉′欢鐨勬墍鏈夋暟鎹�...');
           // 娌℃湁閫変腑琛屾椂锛屽鍑哄綋鍓嶆煡璇㈡潯浠剁殑鏁版嵁
           this.download('system/materials/export', {
             ...this.queryParams
-          }, `materials_${new Date().getTime()}.xlsx`)
+          }, `materials_${new Date().getTime()}.xls`)
         }
       },
 
@@ -1525,7 +1688,7 @@
     {
       this.download('/system/materials/model', {
 
-      }, `materials_${new Date().getTime()}.xlsx`)
+      }, `materials_${new Date().getTime()}.xls`)
     },
        /** 瀵煎叆鎿嶄綔*/
     async handleImportData({file}){
@@ -1578,7 +1741,7 @@
       //淇敼妗堝嵎鐨勭姸鎬�
   //  var id = row.id
       var status = '鏈笂浼犻檮浠�'
-      updateStatusById(status, recordId).then(response=>{
+      updateStatusById(status, recordId, '閫�鍥炵鐞嗗憳').then(response=>{
       //  this.$modal.msgSuccess("鎻愪氦鎴愬姛")
       //  this.getList()
       _this.$store.dispatch('tagsView/delView', this.$route);
@@ -1598,8 +1761,13 @@
       const rect = fixedRow.getBoundingClientRect();
       const parentRect = fixedRow.parentNode.getBoundingClientRect();
 
-      // 妫�鏌ュ厓绱犳槸鍚﹀簲璇ヨ繘鍏ユ偓娴姸鎬�
-      if (rect.top <= 0) {
+      // 璁板綍鍏冪礌鐨勫師濮嬩綅缃紙鐩稿浜庢枃妗i《閮ㄧ殑浣嶇疆锛�
+      if (!this.originalTop) {
+        this.originalTop = rect.top + window.pageYOffset;
+      }
+
+      // 妫�鏌ュ厓绱犳槸鍚﹀簲璇ヨ繘鍏ユ偓娴姸鎬侊紙褰撴粴鍔ㄤ綅缃秴杩囧厓绱犲師濮嬩綅缃椂锛�
+      if (window.pageYOffset >= this.originalTop) {
         // 鍙湪涓嶅湪floating鐘舵�佹椂娣诲姞锛岄伩鍏嶉噸澶嶆搷浣�
         if (!fixedRow.classList.contains('floating')) {
           // 璁板綍鍏冪礌鍘熷鐨勫乏鍋忕Щ閲忥紙鐩稿浜庣埗瀹瑰櫒锛�
@@ -1623,7 +1791,7 @@
           }
         }
       } else {
-        // 褰撳厓绱犲洖鍒拌鍙i《閮ㄤ互涓婃椂锛岀Щ闄ゆ偓娴姸鎬侊紝鎭㈠鍒版枃妗f祦涓�
+        // 褰撴粴鍔ㄤ綅缃洖鍒板厓绱犲師濮嬩綅缃互涓婃椂锛岀Щ闄ゆ偓娴姸鎬侊紝鎭㈠鍒版枃妗f祦涓�
         if (fixedRow.classList.contains('floating')) {
           // 绉婚櫎floating绫�
           fixedRow.classList.remove('floating');
@@ -1697,3 +1865,7 @@
   background-color: #fff;
 }
 </style>
+
+
+
+

--
Gitblit v1.9.1