duy 1 ماه پیش
والد
کامیت
938f35ba87
1فایلهای تغییر یافته به همراه72 افزوده شده و 10 حذف شده
  1. 72 10
      src/views/archives/manage/tuning.vue

+ 72 - 10
src/views/archives/manage/tuning.vue

@@ -28,7 +28,7 @@
             <template #extra>
                 <!-- transfer_initial_expert_btn_sampling -->
                 <HcTooltip keys="archives_tuning_btn_combine">
-                    <el-button :loading="combinationClickLoading" hc-btn :disabled="tableCheckedKeys.length <= 0" @click="combinationClick">
+                    <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="mergeClick">
                         并卷
                     </el-button>
                 </HcTooltip>
@@ -38,12 +38,12 @@
                     </el-button>
                 </HcTooltip>
                 <HcTooltip keys="archives_tuning_update_four">
-                    <el-button hc-btn @click="replaceClick">
+                    <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="replaceClick">
                         查找替换
                     </el-button>
                 </HcTooltip>
                 <HcTooltip keys="archives_tuning_update_four">
-                    <el-button :loading="refreshFileFourLoading" hc-btn @click="refreshFileFourClick">
+                    <el-button :loading="refreshFileFourLoading" hc-btn :disabled="tableCheckedKeys.length <= 0" @click="refreshFileFourClick">
                         更新案卷四要素
                     </el-button>
                 </HcTooltip>
@@ -250,18 +250,26 @@
         </hc-new-dialog>
         
         <!-- 查找替换弹窗 -->
-        <hc-new-dialog v-model="showReplaceModal" :title="replaceTitle" widths="50vw" :loading="saveReplaceLoad" @save="saveReplace">
+        <hc-new-dialog v-model="showReplaceModal" widths="50vw" :loading="saveReplaceLoad" @save="saveReplace">
+            <template #header>
+                <div class="text-1xl mt-2 text-center font-bold">
+                    {{ replaceTitle }}
+                </div>
+            </template>
             <div class="replace-dialog-content">
-                <el-radio-group v-model="tabPosition" style="margin-bottom: 30px" @change="changeTab">
-                    <el-radio-button value="1">新增</el-radio-button>
-                    <el-radio-button value="2">替换</el-radio-button>
-                    <el-radio-button value="3">删除</el-radio-button>
-                </el-radio-group>
+                <div class="text-center">
+                    <el-radio-group v-model="tabPosition" style="margin-bottom: 30px" @change="changeTab">
+                        <el-radio-button value="1">新增</el-radio-button>
+                        <el-radio-button value="2">替换</el-radio-button>
+                        <el-radio-button value="3">删除</el-radio-button>
+                    </el-radio-group>
+                </div>
 
                 <el-form
                     ref="ruleFormRef"
                     :model="ruleForm"
                     label-width="auto"
+                    size="large"
                 >
                     <el-form-item v-if="tabPosition !== '3'" label="查找内容" prop="query">
                         <el-input v-model="ruleForm.query" placeholder="请输入原内容" />
@@ -305,6 +313,19 @@
                 </el-form>
             </div>
         </hc-new-dialog>
+        <!-- 新增并卷弹窗 -->
+        <hc-new-dialog v-model="mergeModal" :loading="combinationClickLoading" widths="50vw" @close="mergeModalClose" @save="combinationClick">
+            <template #header>
+                <div class="text-1xl mt-2 text-center font-bold">
+                    案卷题名修改(并卷后)
+                </div>
+            </template>
+            <hc-table :column="mergeDataColumn" :datas="mergeData" heights="300" :is-index="false" />
+            <div class="mb-4 mt-4 text-orange font-800">
+                并卷后题名
+            </div>
+            <el-input v-model="mergeInput" placeholder="请输入并卷后题名" type="textarea" class="blue-text" />
+        </hc-new-dialog>
     </hc-body>
 </template>
 
@@ -1143,21 +1164,52 @@ const saveReplace = async ()=>{
 //并卷
 const combinationClickLoading = ref(false)
 const combinationClick = async ()=>{
+    if (!mergeInput.value) return window.$message?.warning('请输入并卷后案卷题名')
         combinationClickLoading.value = true
     let ids = ''
     const rows = tableCheckedKeys.value
     ids = rowsToId(rows)
     const { error, code, data, msg } = await tuningApi.reCreateArchiveAuto({
         ids: ids,
+        name:mergeInput.value,
+      
     })
     combinationClickLoading.value = false
     if (!error && code === 200) {
         window.$message?.success(msg)
         getTableData()
+          mergeModal.value = false
     } else {
-        window.$message?.warning(msg)
+        window.$message?.error(msg)
+    }
+}
+const mergeModal = ref(false)
+
+const mergeInput = ref('')
+const mergeModalClose = ()=>{
+    mergeModal.value = false
+}
+const mergeData = ref([])
+const mergeClick = ()=>{
+        if (tableCheckedKeys.value.length === 0) {
+        window.$message?.warning('请选择需要更新的案卷')
+        return
     }
+        // 检查是否有被锁定的案卷
+    const lockedArchives = tableCheckedKeys.value.filter(item => item.isLock === 1)
+    if (lockedArchives.length > 0) {
+        window.$message.warning('选择的案卷中包含被锁定的项,无法并卷')
+        return
+    }
+    mergeData.value = deepClone(tableCheckedKeys.value)
+     mergeModal.value = true
+     mergeInput.value = ''
 }
+const mergeDataColumn = [
+       { key: 'fileNumber', name: '档号', width: 160, align: 'center' },
+            { key: 'name', name: '案卷题名', align: 'center' },
+   
+]
 </script>
 
 <style lang="scss" scoped>
@@ -1206,4 +1258,14 @@ const combinationClick = async ()=>{
     right: 20px;
     top: 10px;
 }
+.replace-dialog-content{
+    background-color:#E9E9E9;
+    padding: 15px;
+}
+</style>
+
+<style>
+.blue-text .el-textarea__inner {
+        color: #409eff;
+    }
 </style>