12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817 |
- <template>
- <hc-body id="carry-spot-checks-layout-target-tuning" :loading="treeLoading" :project-nmae="projectInfo?.name" split>
- <template #tree>
- <HcTree
- :auto-expand-keys="treeAutoExpandKeys" :contract-id="contractId" :project-id="projectId"
- @node-tap="nodeElTreeClick" @menu-tap="ElTreeMenuClick"
- @node-loading="treeNodeLoading"
- />
- </template>
- <hc-new-card>
- <template #header>
- <div class="hc-card-header-table-title">已形成的案卷</div>
- </template>
- <template #search>
- <div class="w-40">
- <el-select v-model="searchForm.queryValueSize" clearable placeholder="限制检索">
- <el-option v-for="item in queryValueSizeOption" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
- </el-select>
- </div>
-
- <div class="ml-2 w-64">
- <el-input v-model="searchForm.queryValue" clearable placeholder="请输入案卷名称关键词检索" @keyup="keyUpEvent" />
- </div>
- <div class="ml-2">
- <el-button type="primary" @click="searchClick">搜索</el-button>
- </div>
- </template>
- <template #extra>
- <HcTooltip keys="archives_tuning_btn_sort">
- <el-button hc-btn :disabled="!searchForm.nodeIds" @click="tableSortClick">
- 排序
- </el-button>
- </HcTooltip>
- <el-tooltip
- v-if="taskInfoList.length > 0"
- class="box-item"
- effect="light"
- placement="bottom"
- >
- <template #content>
- <div class="task-info">
- <div
- v-for="item in taskInfoList"
- :key="item.taskId"
- v-loading="taskListLoad"
- class="task-info-item"
- >
- <div class="task-info-item-left" :class="{ 'text-disable': item.status === 1 }" @click.stop="getInfoDetailClick(item)">
- <span>{{ item.taskTime }}</span>
- <span v-if="item.status === 1" class="ml-2">待生成</span>
- <span v-else class="ml-2">生成</span>
- <span class="text-red">{{ item.num }}</span>
- <span>条AI数据</span>
- </div>
- <div v-if="item.state" class="task-info-item-right ml-2" style=" color:#FF7D43;">
- <HcIcon class="text-hover" name="loader-2" style=" color:#FF7D43;" />
- <span>生成中</span>
- </div>
- <div v-else v-loading="item?.delLoad" class="task-info-item-right ml-4" @click.stop="delClick(item)">
- <HcIcon class="text-hover" name="close-circle" style=" color:#FF7D43;" />
- </div>
- </div>
- </div>
- </template>
- <el-button
- hc-btn
- :disabled="tableCheckedKeys.length <= 0"
- keys="archives_tuning_btn_ai"
- :loading="aiLoading"
- @click="AiClick"
- @mouseenter="getTaskInfoList"
- >
- AI题名
- </el-button>
- </el-tooltip>
- <el-button
- v-else
- hc-btn
- :disabled="tableCheckedKeys.length <= 0"
- keys="archives_tuning_btn_ai"
- :loading="aiLoading"
- @click="AiClick"
- @mouseenter="getTaskInfoList"
- >
- AI题名
- </el-button>
- <HcTooltip keys="archives_tuning_btn_combine">
- <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="mergeClick">
- 重组
- </el-button>
- </HcTooltip>
- <HcTooltip keys="archives_tuning_btn_num">
- <el-button :loading="refreshFileNumberLoading" hc-btn @click="fileNumberClick">
- 档号整理
- </el-button>
- </HcTooltip>
- <HcTooltip keys="archives_tuning_update_four">
- <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 :disabled="tableCheckedKeys.length <= 0" @click="refreshFileFourClick">
- 更新案卷四要素
- </el-button>
- </HcTooltip>
- <HcTooltip keys="archives_tuning_btn_lock">
- <el-button :disabled="tableCheckedKeys.length <= 0" :loading="lockLoad" hc-btn @click="lockarchives">档案锁定</el-button>
- </HcTooltip>
- <HcTooltip keys="archives_tuning_btn_unlock">
- <el-button :disabled="tableCheckedKeys.length <= 0" :loading="unlockLoad" hc-btn @click="unlockarchives">档案解锁</el-button>
- </HcTooltip>
- <HcTooltip keys="archives_tuning_btn_remove">
- <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="movesClick">跨目录移动</el-button>
- </HcTooltip>
- <HcTooltip keys="archives_tuning_btn_edit">
- <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="batchEditClick(1)">编辑</el-button>
- </HcTooltip>
- <HcTooltip keys="archives_tuning_btn_disassemble">
- <el-button :disabled="tableCheckedKeys.length <= 0" hc-btn @click="tunModalClick">拆卷</el-button>
- </HcTooltip>
- <!-- <HcTooltip keys="archives_tuning_btn_del">
- <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="delModalClick">
- <HcIcon name="delete-bin"/>
- <span>删除</span>
- </el-button>
- </HcTooltip> -->
- </template>
- <div class="flex-container body">
- <div class="hc-c-table-box" :style="{ flex: tableFileShow ? '1' : 'auto' }">
- <HcTable
- ref="tableRef" :check-style="{ width: 29 }" :column="tableColumn" :datas="tableData"
- :index-style="{ width: 70 }" :is-arr-index="false" :loading="tableLoading" :ui="hoverHand ? 'hover-hand' : ''"
- is-check is-new is-current-row
- :row-style="tableRowStyle" @selection-change="tableSelection"
- @row-click="tableRowClick"
- >
- <template #name="{ row }">
- <span class="text-link" :class="row.colourStatus === 2 || row?.actionType === 1 || row?.actionType === 2 ? 'text-orange' : ''">
- <HcIcon v-if="row.isLock === 1" name="lock" style=" color:red;font-weight: bold;" />
- <HcIcon v-else name="lock-unlock" style=" color:green;font-weight: bold;" />
-
- {{ row?.name }}
- </span>
- </template>
- <template #action="{ row }">
- <el-link
- v-loading="row.consultLoading"
- class="view-file-link"
- type="primary"
- @click.stop="consultFileClick(row, 1)"
- >
- 查阅案卷
- </el-link>
- </template>
- </HcTable>
- </div>
- <div v-if="tableFileShow" class="hc-f-table-box" :style="{ flex: tableFileShow ? 'auto' : '0' }">
- <div class="header-box">
- <div class="header">卷内文件</div>
-
- <el-tooltip
-
- effect="light"
- content="按住鼠标拖动可改变表格高度"
- placement="top"
- >
- <HcIcon class="hc-icon-close text-hover" name="arrow-up-double" style="color:rgb(64, 149, 229);" @mousedown="startDrag($event)" />
- </el-tooltip>
- <div>
- <HcTooltip keys="archives_tuning_btn_insert">
- <el-button hc-btn type="success" size="small" :disabled="intableCheckedKeys.length <= 0" @click="insertClick">
- 插卷
- </el-button>
- </HcTooltip>
- <el-button hc-btn type="primary" size="small" @click="batchEditClick(2)">
- 编辑
- </el-button>
-
- <el-button hc-btn type="warning" size="small" @click="closetableFile(2)">
- 删除
- </el-button>
- </div>
- </div>
- <div v-loading="intableLoading" class="hc-file-table-box">
- <HcTable
- ref="tableFileRef" :check-style="{ width: 29 }" :column="innertableColumn" :datas="intableData"
- :index-style="{ width: 60 }" :loading="intableLoading" is-check is-new
-
- @selection-change="intableSelection"
- >
- <template #table-column-header-num>
- <HcTooltip keys="archives_tuning_btn_sort">
- <span class="text-link text-lg" @click="intableSortClick">
- <HcIcon class="text-hover" name="arrow-up-down" />
- </span>
- </HcTooltip>
- </template>
- <template #fileName="{ row }">
- <span class="text-link text-hover" @click="viewfilePdf(row)">{{ row?.fileName }}</span>
- </template>
- <template #action="{ row }">
- <el-link
- class="view-file-link"
-
- type="primary"
- @click.stop="viewfilePdf(row)"
- >
- 查阅文件
- </el-link>
- </template>
- </HcTable>
- <!-- <HcPages :pages="insearchForm" @change="inpageChange"/> -->
- </div>
- </div>
- </div>
- <template #action>
- <HcPages :pages="searchForm" :sizes="[20, 50, 100, 200, 300, 500]" @change="pageChange" />
- </template>
- </hc-new-card>
- <!-- 跨目录移动 -->
- <hc-new-dialog v-model="movesModal" :loading="movesModalLoading" is-table title="跨目录移动" widths="80vw" @close="movesModalClose" @save="movesModalSave">
- <div class="hc-moves-transfer-box">
- <div class="hc-moves-transfer-panel">
- <div class="panel-header">
- <div class="panel-header-label">
- <el-checkbox v-model="movesCheckAll" :indeterminate="isIndeterminate" class="space size-xl" @change="handleCheckAllChange">
- 选择需要迁移的文件
- </el-checkbox>
- </div>
- <div class="panel-header-extra">{{ checkedMoves.length }}/{{ tableCheckedKeys.length }}</div>
- </div>
- <div class="panel-body">
- <el-scrollbar>
- <el-checkbox-group v-model="checkedMoves" @change="handleCheckedMovesChange">
- <div v-for="item in tableCheckedKeys" :key="item.id" class="hc-file-checkbox">
- <el-checkbox :value="item.id" class="space size-xl">{{ item.name }}</el-checkbox>
- </div>
- </el-checkbox-group>
- </el-scrollbar>
- </div>
- </div>
- <div class="hc-moves-transfer-buttons">
- <!-- <el-button hc-btn _icon size="small"
- :type="tableCheckedKeys.length <= 0 || checkedMoves.length <= 0 ? '' : 'primary'"
- :disabled="tableCheckedKeys.length <= 0 || checkedMoves.length <= 0">
- <HcIcon name="arrow-right"/>
- </el-button> -->
- <HcIcon name="arrow-right-double" style="font-size: 22px;" type="primary" />
- </div>
- <div class="hc-moves-transfer-panel">
- <div class="panel-header">选择移动目录</div>
- <div class="panel-body">
- <el-scrollbar>
- <HcTree :contract-id="contractId" :is-show-menu="false" :project-id="projectId" id-prefix="hc-tree-moves-" is-radio @noderadio="nodeRadio" />
- </el-scrollbar>
- </div>
- </div>
- </div>
- </hc-new-dialog>
- <!-- 调整排序 -->
- <hc-new-dialog v-model="sortModal" is-table title="调整排序" widths="980px" :loading="sortModalLoading" @close="sortModalClose" @save="sortModalSave">
- <el-alert :closable="false" title="可拖动排序,也可在后面点击图标,切换排序" type="error" />
- <div class="hc-table-h">
- <HcTable
- :column="sortTableColumn" :datas="sortTableData" :index-style="{ width: 60 }"
- :loading="sortTableLoading" is-new
- is-row-drop ui="hc-table-row-drop" @row-drop="sortTableRowDrop"
- >
- <template #action="{ index }">
- <span class="text-link text-xl" @click="upSortClick(index)">
- <HcIcon fill name="arrow-up" />
- </span>
- <span class="text-link ml-2 text-xl" @click="downSortClick(index)">
- <HcIcon fill name="arrow-down" />
- </span>
- </template>
- </HcTable>
- </div>
- </hc-new-dialog>
- <!-- 编辑案卷信息 -->
- <hc-new-dialog v-model="showUploadModal" :title="editTitle" widths="80vw">
- <template #search>
- <el-button hc-btn type="primary" :disabled="tableCheckedKeysUpload.length === 0" @click="replaceClickCollect">
- 查找替换
- </el-button>
- </template>
- <HcTable
- ref="tableUploadRef"
- :column="tableUploadColumn" :datas="tableUploadData" :index-style="{ width: 60 }"
- :loading="uploadSaveLoading" is-new ui="hc-form-table" is-check @selection-change="uploadTableSelection"
- >
- <template #name="{ row }">
- <el-input v-model="row.name" :class="row.isFileNumber ? 'is-error' : ''" type="textarea" :autosize="{ minRows: 2, maxRows: 5 }" @input="tableIsInput($event, row, 'name')" />
- </template>
- <template #fileNumber="{ row }">
- <el-input v-model="row.fileNumber" :class="row.isFileNumber ? 'is-error' : ''" @input="tableIsInput($event, row, 'isFileNumber')" />
- </template>
- <template #fileName="{ row }">
- <el-input v-model="row.fileName" :class="row.isFileName ? 'is-error' : ''" type="textarea" @input="tableIsInput($event, row, 'isFileName')" />
- </template>
- <template v-if="editType === 2" #fileTime="{ row }">
- <el-date-picker v-model="row.fileTime" :clearable="false" format="YYYYMMDD" type="date" value-format="YYYYMMDD" />
- </template>
- <template #unit="{ row }">
- <el-input v-model="row.unit" />
- </template>
- <template #remark="{ row }">
- <el-input v-model="row.remark" type="textarea" />
- </template>
- <template #storageTime="{ row }">
- <el-select v-model="row.storageTime" placeholder="请选择" clearable>
- <el-option v-for="item in retentionPeriod" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
- </el-select>
- </template>
- </HcTable>
- <template #footer>
- <div class="lr-dialog-footer">
- <div class="left flex items-center" />
- <div class="right">
- <el-button size="large" @click="batchUploadCancel">
- <HcIcon name="close" />
- <span>取消</span>
- </el-button>
- <el-button :disabled="uploadSaveLoading" :loading="uploadSaveLoading" hc-btn type="primary" @click="batchUploadSave">
- <HcIcon name="save" />
- <span>保存</span>
- </el-button>
- </div>
- </div>
- </template>
- </hc-new-dialog>
-
- <!-- 查找替换弹窗 -->
- <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">
- <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="请输入原内容" />
- </el-form-item>
- <el-form-item v-if="tabPosition === '1'" label="新增内容" prop="replace">
- <el-input
- v-model="ruleForm.replace"
- placeholder="请输入新增内容"
- />
- </el-form-item>
- <el-form-item v-if="tabPosition === '2'" label="替换内容" prop="replace">
- <el-input
- v-model="ruleForm.replace"
- placeholder="请输入替换后内容"
- />
- </el-form-item>
- <el-form-item v-if="tabPosition === '3'" label="删除内容" prop="query">
- <el-input
- v-model="ruleForm.query"
- placeholder="请输入原内容"
- />
- </el-form-item>
- <el-form-item v-if="tabPosition === '1'" label="定位条件" prop="position">
- <el-select
- v-model="ruleForm.position"
- placeholder="请选择"
- >
- <el-option
- label="前"
- :value="1"
- />
- <el-option
- label="后"
- :value="2"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="作用范围">
- <span>{{ checkInfo }}</span>
- </el-form-item>
- </el-form>
- </div>
- </hc-new-dialog>
- <!-- 新增重组弹窗 -->
- <hc-new-dialog v-model="mergeModalBefore" :loading="mergeModalBeforeLoading" widths="15vw" @close="mergeModalBeforeClose" @save="mergeModalBeforeClick">
- <template #header>
- <div class="text-1xl mt-2 text-center font-bold">
- 并卷或重组
- </div>
- </template>
-
-
- <el-radio-group v-model="mergeModalBeforeType">
- <el-radio value="1" size="large">并卷</el-radio>
- <el-radio value="2" size="large">重组</el-radio>
- </el-radio-group>
- </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" :autosize="{ minRows: 4, maxRows: 8 }" />
- </hc-new-dialog>
- <!-- 档案整理弹窗 -->
- <hc-new-dialog v-model="fileNumberModal" :loading="refreshFileNumberLoading" widths="30vw" @close="fileModalClose" @save="refreshFileNumberClick">
- <template #header>
- <div class="text-1xl mt-2 text-center font-bold">
- 起始流水号
- </div>
- </template>
-
- <el-input v-model="startNumber" placeholder="请输入数值1、2、3" class="blue-text" @input="handleNumberInput" />
- </hc-new-dialog>
- <!-- 排序弹窗 -->
- <hc-new-dialog v-model="sortModalDialog" :loading="sortModalDialogLoading" widths="20vw" @close="sortModalDialogClose" @save="sortModalDialogClick">
- <template #header>
- <div class="text-1xl mt-2 text-center font-bold">
- 选择排序规则
- </div>
- </template>
-
- <el-radio-group v-model="sortTypeVal">
- <el-radio value="1" size="large">按节点排序</el-radio>
- <el-radio value="2" size="large">按流水号排序</el-radio>
- </el-radio-group>
- </hc-new-dialog>
- <!-- 展开案卷 -->
- <CarrySpotChecksDrawer :show="spotChecksDrawer" :file-id="fileId" :checkmeta-file-id="checkmetaFileId" @close="onCarrySpotChecksClose" />
- <!-- 卷内编辑查找替换弹窗 -->
- <hc-new-dialog v-model="showReplaceModalCollect" widths="50vw" :loading="saveReplaceLoadCollect" @save="saveReplaceCollect">
- <template #header>
- <div class="text-1xl mt-2 text-center font-bold">
- {{ replaceTitleCollect }}
- </div>
- </template>
- <div class="replace-dialog-content">
- <div class="text-center">
- <el-radio-group v-model="tabPositionCollect" 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="ruleFormCollect"
- label-width="auto"
- size="large"
- >
- <el-form-item v-if="tabPositionCollect !== '3'" label="查找内容" prop="query">
- <el-input v-model="ruleFormCollect.query" placeholder="请输入原内容" />
- </el-form-item>
- <el-form-item v-if="tabPositionCollect === '1'" label="新增内容" prop="replace">
- <el-input
- v-model="ruleFormCollect.replace"
- placeholder="请输入新增内容"
- />
- </el-form-item>
- <el-form-item v-if="tabPositionCollect === '2'" label="替换内容" prop="replace">
- <el-input
- v-model="ruleFormCollect.replace"
- placeholder="请输入替换后内容"
- />
- </el-form-item>
- <el-form-item v-if="tabPositionCollect === '3'" label="删除内容" prop="query">
- <el-input
- v-model="ruleFormCollect.query"
- placeholder="请输入原内容"
- />
- </el-form-item>
- <el-form-item v-if="tabPositionCollect === '1'" label="定位条件" prop="position">
- <el-select
- v-model="ruleFormCollect.position"
- placeholder="请选择"
- >
- <el-option
- label="前"
- :value="1"
- />
- <el-option
- label="后"
- :value="2"
- />
- </el-select>
- </el-form-item>
- </el-form>
- </div>
- </hc-new-dialog>
- <!-- 插卷弹窗 -->
-
- <FileInsertModal ref="fileInsertModalRef" @close="closeFileModal" />
- </hc-body>
- </template>
- <script setup>
- import { nextTick, onActivated, onMounted, ref, watch } from 'vue'
- import { useAppStore } from '~src/store'
- import HcTree from '~src/components/tree/hc-tree.vue'
- import { arrToId, deepClone, getArrValue } from 'js-fast-way'
- import { rowsToId, rowsToIdNumArr } from '~uti/tools'
- import tuningApi from '~api/archiveConfig/tuning.js'
- import archiveFileApi from '~api/archiveFile/archiveFileAuto.js'
- import archiveFileApiCollect from '~api/archiveFile/archiveFile'
- import aiApi from '~api/ai/ai.js'
- import { HcDelMsg } from 'hc-vue3-ui'
- import { getStoreValue, setStoreValue } from '~src/utils/storage'
- import { toPdfPage } from '~uti/btn-auth'
- import { getDictionaryBiz } from '~api/other'
- import CarrySpotChecksDrawer from './carryDrawer/carrySpotChecksDrawer.vue'
- import tasksApi from '~api/tasks/data'
- import { useRouter } from 'vue-router'
- import FileInsertModal from './FileInsertModal.vue'
- //变量
- const router = useRouter()
- const useAppState = useAppStore()
- const projectId = ref(useAppState.getProjectId)
- const contractId = ref(useAppState.getContractId)
- const projectInfo = ref(useAppState.getProjectInfo)
- const isCollapse = ref(useAppState.getCollapse)
- const hoverHand = ref(true)
- const AppTheme = ref(useAppState.getTheme)
- //监听
- watch(() => [
- useAppState.getCollapse,
- useAppState.getTheme,
- ], ([Collapse, theme]) => {
- isCollapse.value = Collapse
- AppTheme.value = theme
- })
- //渲染完成
- onMounted(() => {
- // getClassIfyList()
- getOptions()
- setTableColumns()
- getStoragePeriod()
- })
- onActivated(() => {
- // getClassIfyList()
- getTableData()
- })
- const tableFileRef = ref(null)
- //树加载
- const treeLoading = ref(true)
- const treeNodeLoading = () => {
- treeLoading.value = false
- }
- //项目树被点击
- //自动展开缓存
- const treeAutoExpandKeys = ref(getStoreValue('turningExpandKeys') || [])
- const nodeElTreeClick = ({ node, data, keys, key }) => {
- //缓存展开的节点
- setStoreValue('turningExpandKeys', keys)
- treeAutoExpandKeys.value = keys || []
- searchForm.value.total = 0
- searchForm.value.current = 1
- // searchForm.value.size = 20
- searchForm.value.nodeIds = data.id || ''
- getTableData()
- }
- //树菜单被点击
- const ElTreeMenuClick = async ({ key, node, data, keys }) => {
- setStoreValue('turningExpandKeys', keys)
- treeAutoExpandKeys.value = keys || []
- }
- const nodeRadio = ({ node, data, keys, key }) => {
- console.log(data, 'data33333')
- chnodeId.value = data.id || ''
- console.log(chnodeId.value, ' chnodeId.value')
- }
- //搜索表单
- const searchForm = ref({
- contractId: null, type: null, approval: null,
- current: 1, size: 20, total: 0,
- })
- const insearchForm = ref({
- contractId: null, type: null, approval: null,
- current: 1, size: 1000, total: 0,
- })
- //分页被点击
- const pageChange = ({ current, size }) => {
- searchForm.value.current = current
- searchForm.value.size = size
- getTableData()
- }
- //表格数据
- const tableRef = ref(null)
- const tableColumn = ref([])
- //设置表头
- const setTableColumns = () => {
- tableColumn.value = [
- { key: 'fileNumber', name: '档号' },
- { key: 'name', name: '案卷题名', width: 500 },
- { key: 'storageTimeValue', name: '保管期限' },
- { key: 'pageN', name: '总页数' },
- { key: 'action', name: '操作', width:100 },
- ]
- }
- //回车搜索
- const keyUpEvent = (e) => {
- if (e.key === 'Enter') {
- searchForm.value.current = 1
- getTableData()
- }
- }
- //搜索
- const searchClick = () => {
- searchForm.value.current = 1
- getTableData()
- }
- const tableData = ref([])
- //获取数据
- const tableLoading = ref(false)
- const getTableData = async () => {
- tableFileShow.value = false
- tableLoading.value = true
- const { error, code, data } = await tuningApi.pageByArchive({
- ...searchForm.value,
- projectId: projectId.value,
- contractId: contractId.value,
- isArchive: 1,
- })
- tableLoading.value = false
- if (!error && code === 200) {
- tableData.value = getArrValue(data?.records)
- searchForm.value.total = data?.total || 0
- } else {
- tableData.value = []
- searchForm.value.total = 0
- }
- }
- const queryValueSizeOption = ref([])
- const getOptions = async () => {//内业资料类型
- const { data, code } = await getDictionaryBiz({ code: 'queryValueSize' })
- if (code === 200) {
- queryValueSizeOption.value = data
- }
- }
- const innertableColumn = ref([])
- const intableData = ref([])
- //设置表头
- const setInnertableColumn = () => {
- innertableColumn.value = [
- { key: 'fileNumber', name: '文件编号' },
- { key: 'fileName', name: '文件题名', width: 500 },
- { key: 'fileTime', name: '文件日期' },
- { key: 'dutyUser', name: '责任者' },
- { key: 'filePage', name: '页数' },
- { key: 'action', width:100, name:'操作' },
- ]
- }
- const intableLoading = ref(false)
- //获取卷内文件
- const getintableData = async () => {
- intableLoading.value = true
- const { error, code, data } = await tuningApi.getarchiveFilePage({
- ...insearchForm.value,
- // nodeIds: searchForm.value.nodeIds,
- archiveId: checkInid.value,
- })
- intableLoading.value = false
- if (!error && code === 200) {
- intableData.value = getArrValue(data['records'])
- insearchForm.value.total = data['total'] || 0
- } else {
- intableData.value = []
- insearchForm.value.total = data['total'] || 0
- }
- }
- //多选
- const tableCheckedKeys = ref([])
- const intableCheckedKeys = ref([])
- const tableSelection = (rows) => {
- tableCheckedKeys.value = rows
- }
- const tableRowStyle = ({ row }) => {
- // 只根据inType属性判断样式,确保排序后依然有效
- if (row?.actionType === 1 || row?.actionType === 2) {
- return 'color: orange;'
- }
- }
- const inTableRowStyle = ({ row }) => {
- // 只根据inType属性判断样式,确保排序后依然有效
- if (row?.pageNum === '') {
- return 'color: orange;'
- }
- }
- const intableSelection = (rows) => {
- intableCheckedKeys.value = rows
- }
- const isDragging = ref(false) // 添加一个标志来跟踪鼠标是否按下
- const startDrag = (event) => {
- isDragging.value = true // 鼠标按下时设置标志为true
- const startY = event.clientY
- const initialHeight = document.querySelector('.hc-f-table-box').offsetHeight
- document.onmousemove = (moveEvent) => {
- console.log(isDragging.value, 'isDragging.value')
-
- if (isDragging.value) { // 确保只有在鼠标按下时才会改变高度
- const moveY = moveEvent.clientY
- const deltaY = startY - moveY // 修改这里,使用 startY 减去 moveY
- const newHeight = Math.max(50, initialHeight + deltaY) // 最小高度设为50
- document.querySelector('.hc-f-table-box').style.height = `${newHeight}px`
- }
- }
- document.onmouseup = () => {
-
- document.onmousemove = null
- document.onmouseup = null
- isDragging.value = false // 鼠标释放时设置标志为false
- }
- }
- //删除
- const delModalClick = () => {
- let ids = ''
- const rows = intableCheckedKeys.value
- ids = rowsToId(rows)
- if (rows.length > 0) {
- window?.$messageBox?.alert('请谨慎考虑是否要批量删除卷内文件?', '删除文件', {
- showCancelButton: true,
- confirmButtonText: '确认删除',
- cancelButtonText: '取消',
- type: 'warning',
- callback: async (action, ctx, close) => {
- ctx.confirmButtonLoading = true
- if (action === 'confirm') {
- const { error, code, data, msg } = await tuningApi.removeFiles({
- ids: ids,
- archiveId: checkInid.value,
- })
- ctx.confirmButtonLoading = false
- if (!error && code === 200) {
- window.$message?.success(msg)
- getintableData()
- } else {
- window.$message?.warning(msg)
- }
- }
- },
- })
- } else {
- window.$message.warning('请先选择文件')
- }
- }
- const splitLoad = ref(false)
- const tunModalClick = () => {
- const rows = tableCheckedKeys.value
- let iscansplit = rows.filter((item) => {
- if (item?.isLock === 1) {
- return item
- }
- })
- if (iscansplit.length > 0) {
- window.$message.warning('选择的案卷已被锁定,不允许拆卷')
- } else {
- splitLoad.value = true
- window?.$messageBox?.alert('请谨慎考虑是否要批量拆除已经案卷及卷内文件?', '拆除案卷', {
- showCancelButton: true,
- confirmButtonText: '确认拆卷',
- cancelButtonText: '取消',
- type: 'warning',
- callback: async (action, ctx, close) => {
- if (action === 'confirm') {
- console.log(1111)
- ctx.confirmButtonLoading = true
- let ids = ''
- ids = rowsToId(rows)
- const { error, code, data, msg } = await tuningApi.splitArchive({
- ids: ids,
- })
- ctx.confirmButtonLoading = true
- if (!error && code === 200) {
- window.$message?.success(msg)
- getTableData()
- } else {
- window.$message?.error(msg)
- }
- }
- },
- })
- }
- }
- //左右拖动,改变树形结构宽度
- const leftWidth = ref(382)
- const onmousedown = () => {
- const leftNum = isCollapse.value ? 142 : 272
- document.onmousemove = (ve) => {
- let diffVal = ve.clientX - leftNum
- if (diffVal >= 310 && diffVal <= 900) {
- leftWidth.value = diffVal
- }
- }
- document.onmouseup = () => {
- document.onmousemove = null
- document.onmouseup = null
- }
- }
- //跨目录移动
- const movesModal = ref(false)
- const movesClick = () => {
- movesModal.value = true
- }
- //选择需要迁移的文件
- const movesCheckAll = ref(false)
- const isIndeterminate = ref(true)
- const checkedMoves = ref([])
- //全选
- const handleCheckAllChange = (val) => {
- const checked = tableCheckedKeys.value
- const keys = rowsToIdNumArr(checked)
- checkedMoves.value = val ? keys : []
- isIndeterminate.value = false
- }
- //勾选
- const handleCheckedMovesChange = (value) => {
- const keys = tableCheckedKeys.value
- const checkedCount = value.length
- movesCheckAll.value = checkedCount === keys.length
- isIndeterminate.value = checkedCount > 0 && checkedCount < keys.length
- }
- //保存
- const movesModalLoading = ref(false)
- const chnodeId = ref('')
- const movesModalSave = async () => {
- movesModalLoading.value = true
- console.log(checkedMoves.value, 'checkedMoves.value')
- let ids = checkedMoves.value.join(',')
- const { error, code, data, msg } = await tuningApi.moveArchive({
- ids: ids,
- nodeId: chnodeId.value,
- })
- movesModalLoading.value = false
- if (!error && code === 200) {
- console.log(msg, 'msg')
- window.$message?.success(msg)
- getTableData()
- } else {
- window.$message?.warning(msg)
- }
- movesModal.value = false
- }
- //关闭
- const movesModalClose = () => {
- movesModal.value = false
- }
- //表格排序
- const sortModal = ref(false)
- //显示
- const intableSortClick = () => {
- sortModal.value = true
- sortType.value = 2
- setsortTableColumn()
- getSortTableData()
- }
- //表格行被点击
- const tableFileShow = ref(false)
- const checkInid = ref('')
- const checkRow = ref({})
- const tableRowClick = ({ row }) => {
- tableFileShow.value = true
- intableLoading.value = true
- checkRow.value = row
- checkInid.value = row.id
- fileId.value = row.id
- setInnertableColumn()
- getintableData()
- // 限制 hc-f-table-box 的初始高度不超过容器的一半
- nextTick(()=>{
- const containerHeight = document.querySelector('.flex-container').clientHeight
- const maxHeight = containerHeight / 6
- const initialHeight = Math.min(document.querySelector('.hc-f-table-box').offsetHeight, maxHeight)
- document.querySelector('.hc-f-table-box').style.height = `${initialHeight}px`
- })
-
- }
- //收起卷内文件
- const closetableFile = () => {
- tableFileShow.value = false
- }
- //卷内文件点击
- //搜索表单
- const sortSearchForm = ref({
- current: 1, size: 20, total: 0,
- })
- //分页被点击
- const sortPageChange = ({ current, size }) => {
- searchForm.value.current = current
- searchForm.value.size = size
- getSortTableData()
- }
- const setsortTableColumn = () => {
- if (sortType.value === 1) {
- sortTableColumn.value = [
- { key: 'fileNumber', name: '档号', width: 160 },
- { key: 'name', name: '案卷名称' },
- { key: 'action', name: '排序', width: 90 },
- ]
- } else if (sortType.value === 2) {
- sortTableColumn.value = [
- { key: 'fileNumber', name: '文件编号', width: 160 },
- { key: 'fileName', name: '文件名称' },
- { key: 'action', name: '排序', width: 90 },
- ]
- }
- }
- //表格数据
- const sortTableColumn = ref([
- { key: 'fileNumber', name: '档号', width: 160 },
- { key: 'name', name: '案卷名称' },
- { key: 'action', name: '排序', width: 90 },
- ])
- const sortTableData = ref([])
- const sortTableLoading = ref(false)
- const sortType = ref(null)
- const getSortTableData = async () => {
- if (sortType.value === 1) {
- sortTableLoading.value = true
- const { error, code, data } = await tuningApi.pageByArchive({
- ...searchForm.value,
- projectId: projectId.value,
- contractId: contractId.value,
- isArchive: 0,
- })
- sortTableLoading.value = false
- if (!error && code === 200) {
- sortTableData.value = getArrValue(data['records'])
- sortSearchForm.value.total = data['total'] || 0
- } else {
- sortTableData.value = []
- sortSearchForm.value.total = 0
- }
- } else if (sortType.value === 2) {
- sortTableLoading.value = true
- const { error, code, data } = await tuningApi.getarchiveFilePage({
- ...insearchForm.value,
- nodeIds: searchForm.value.nodeIds,
- archiveId: checkInid.value,
- })
- sortTableLoading.value = false
- if (!error && code === 200) {
- sortTableData.value = getArrValue(data['records'])
- sortSearchForm.value.total = data['total'] || 0
- } else {
- sortTableData.value = []
- sortSearchForm.value.total = 0
- }
- }
- sortSearchForm.value.current = 1
- }
- //拖动完成
- const sortTableRowDrop = (rows) => {
- sortTableData.value = rows
- }
- //向下
- const downSortClick = (index) => {
- const indexs = index + 1
- const data = sortTableData.value
- if (indexs !== data.length) {
- const tmp = data.splice(indexs, 1)
- sortTableData.value.splice(index, 0, tmp[0])
- } else {
- window?.$message?.warning('已经处于置底,无法下移')
- }
- }
- //向上
- const upSortClick = (index) => {
- const data = sortTableData.value || []
- if (index !== 0) {
- const tmp = data.splice(index - 1, 1)
- sortTableData.value.splice(index, 0, tmp[0])
- } else {
- window?.$message?.warning('已经处于置顶,无法上移')
- }
- }
- //保存
- const sortModalLoading = ref(false)
- const sortModalSave = async () => {
- sortModalLoading.value = true
- const { error, code } = await tuningApi.archiveFileBatchUpdate({
- list: sortTableData.value,
- }, false)
- //判断状态
- sortModalLoading.value = false
- if (!error && code === 200) {
- sortModal.value = false
- getintableData()
- } else {
- window.$message?.error('保存失败')
- }
- }
- //关闭
- const sortModalClose = () => {
- sortModal.value = false
- }
- //编辑
- const showUploadModal = ref(false)
- const isBuiltDrawing = ref(0)
- const editTitle = ref('')
- const editType = ref()
- //批量上传保存
- const uploadSaveLoading = ref(false)
- //批量编辑
- //批量编辑
- const batchEditClick = (type) => {
- let rows = []
- if (type === 1) {
- editTitle.value = '编辑案卷信息'
- editType.value = 1
- rows = deepClone(tableCheckedKeys.value)
- // 检查是否有被锁定的案卷
- const lockedArchives = tableCheckedKeys.value.filter(item => item.isLock === 1)
- if (lockedArchives.length > 0) {
- window.$message.warning('选择的案卷中包含被锁定的项,无法更新')
- return
- }
- } else {
- editTitle.value = '编辑文件信息'
- editType.value = 2
- rows = deepClone(intableCheckedKeys.value)
- }
- //判断状态
- setTableUploadColumn(type)
- uploadSaveLoading.value = false
- tableUploadData.value = rows
- console.log(checkRow.value, 'checkRow.value')
- if (checkRow.value?.isLock !== 1) {
- if (rows.length > 0) {
- showUploadModal.value = true
- } else {
- window.$message.warning('请先选择文件')
- }
- } else {
- window.$message.warning('该案卷已被锁定,不允许编辑卷内文件')
- }
- }
- //设置文件表头
- //保管期限
- const retentionPeriod = ref([
-
- ])
- const getStoragePeriod = async () => {
- const { error, code, data } = await tasksApi.queryTaskTypeStatus({
- typeOrStatus: 'storage_period',
- })
- //处理数据
- if (!error && code === 200) {
- retentionPeriod.value = getArrValue(data)
- retentionPeriod.value = retentionPeriod.value.filter(item=>item.dictKey !== '0')
- } else {
- retentionPeriod.value = []
- }
- }
- const tableUploadRef = ref(null)
- const tableUploadColumn = ref([])
- const setTableUploadColumn = (type) => {
- if (type === 1) {
- tableUploadColumn.value = [
- { key: 'fileNumber', name: '档号', width:160 },
- { key: 'name', name: '案卷题名' },
- { key: 'storageTime', name: '保管期限', width:100 },
- { key: 'unit', name: '立卷单位', width:200 },
- { key: 'remark', name: '备注', width:180 },
- ]
- } else {
- tableUploadColumn.value = [
- { key: 'fileNumber', name: '文件编号' },
- { key: 'fileName', name: '文件题名', width:500 },
- { key: 'fileTime', name: '文件日期' },
- { key: 'dutyUser', name: '责任者' },
- ]
- }
- }
- const tableUploadData = ref([])
- const batchUploadCancel = () => {
- showUploadModal.value = false
- tableUploadData.value = []
- }
- //多选
- const tableCheckedKeysUpload = ref([])
- const uploadTableSelection = (rows) => {
- tableCheckedKeysUpload.value = rows
- }
- //确认上传保存
- const batchUploadSaveApi = async (rows) => {
- uploadSaveLoading.value = true
- const { error, code } = await archiveFileApi.batchUploadSave({
- list: rows,
- }, false)
- //判断状态
- uploadSaveLoading.value = false
- if (!error && code === 200) {
- window.$message?.success('保存成功')
- batchUploadCancel()
- getTableData()
- } else {
- window.$message?.error('保存失败')
- }
- }
- //确认上传保存
- const archiveFileBatchUpdate = async (rows) => {
- uploadSaveLoading.value = true
- const { error, code } = await tuningApi.archiveFileBatchUpdate({
- list: rows,
- }, false)
- //判断状态
- uploadSaveLoading.value = false
- if (!error && code === 200) {
- window.$message?.success('保存成功')
- batchUploadCancel()
- getTableData()
- } else {
- window.$message?.error('保存失败')
- }
- }
- //批量新增编辑保存
- const batchUploadSave = async () => {
- const rows = tableUploadData.value
- if (rows.length > 0) {
- //验证表单数据
- uploadSaveLoading.value = true
- let isTableRows = false
- //判断数据
- if (isTableRows) {
- uploadSaveLoading.value = false
- window.$message?.warning('请先完善表单信息')
- } else {
- console.log(rows, 'rows')
- if (editType.value === 2) {
- //数据处理
- rows.forEach((element, index) => {
- const { dates } = element
- element.startDate = dates ? dates[0] : null
- element.endDate = dates ? dates[1] : null
- element.autoFileSort = index + 1
- })
- await archiveFileBatchUpdate(rows)
- } else {
- await batchUploadSaveApi(rows)
- }
- // if (tableUploadType.value === 'add') {
- // await batchUploadSaveApi(rows)
- // } else {
- // await batchEditSaveApi(rows)
- // }
- }
- } else {
- window.$message?.warning('请先上传文件')
- }
- }
- const lockLoad = ref(false)
- const unlockLoad = ref(false)
- //档案锁定
- const lockarchives = async () => {
- lockLoad.value = true
- let ids = ''
- const rows = tableCheckedKeys.value
- ids = rowsToId(rows)
- const { error, code, data, msg } = await tuningApi.archivesautoLock({
- ids: ids,
- })
- lockLoad.value = false
- if (!error && code === 200) {
- console.log(msg, 'msg')
- window.$message?.success(msg)
- getTableData()
- } else {
- window.$message?.warning(msg)
- }
- }
- const unlockarchives = async () => {
- unlockLoad.value = true
- let ids = ''
- const rows = tableCheckedKeys.value
- ids = rowsToId(rows)
- const { error, code, data, msg } = await tuningApi.archivesautoUnLock({
- ids: ids,
- })
- unlockLoad.value = false
- if (!error && code === 200) {
- window.$message?.success(msg)
- getTableData()
- } else {
- window.$message?.warning(msg)
- }
- }
- //查看卷内文件pdf
- const viewfilePdf = (row) => {
-
- fileId.value = row.archiveId
- // 先重置值,确保每次点击都能触发变化
- checkmetaFileId.value = ''
- spotChecksDrawer.value = false
-
- // 使用nextTick确保DOM更新后再设置新值
- nextTick(() => {
- checkmetaFileId.value = row.id
- spotChecksDrawer.value = true
- })
-
- }
- //档号整理
- const startNumber = ref('')
- const fileNumberClick = ()=>{
- fileNumberModal.value = true
- }
- const handleNumberInput = (value) => {
- // 只保留数字
- startNumber.value = value.replace(/[^\d]/g, '')
- }
- const fileModalClose = ()=>{
- fileNumberModal.value = false
- startNumber.value = ''
- }
- //档号整理弹窗
- const fileNumberModal = ref(false)
- const refreshFileNumberLoading = ref(false)
- const refreshFileNumberClick = async () => {
- if (!startNumber.value) {
- window.$message?.warning('请输入起始流水号')
- return
- }
- const { error, code, msg } = await tuningApi.refreshFileNumber({
- projectId: projectId.value,
- contractId: contractId.value,
- nodeId: searchForm.value.nodeIds || '',
- isArchive: 1,
- startNumber:startNumber.value,
-
- })
- if (!error && code === 200) {
- window.$message?.success(msg)
- fileModalClose()
- getTableData()
- } else {
- window.$message?.warning(msg)
- }
- }
- //更新案卷四要素
- const refreshFileFourLoading = ref(false)
- const refreshFileFourClick = async ()=>{
- 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
- }
- refreshFileFourLoading.value = true
- const rows = tableCheckedKeys.value
- let ids = ''
- ids = arrToId(rows)
- const { error, code, data, msg } = await tuningApi.updateArchiveFour({
- projectId: projectId.value,
-
- archiveIds:ids,
- })
- refreshFileFourLoading.value = false
- if (!error && code === 200) {
- window.$message?.success(msg)
- getTableData()
- } else {
- window.$message?.warning(msg)
- }
- }
- // 查找替换弹窗相关变量
- const showReplaceModal = ref(false)
- // 查找替换弹窗相关变量
- const replaceTitle = ref('查找替换')
- const checkInfo = ref('')
- // 触发查找替换弹窗显示
- const replaceClick = () => {
- checkInfo.value = ''
- 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
- }
- // 更新checkInfo的值
- checkInfo.value = `共计${tableCheckedKeys.value.length}项,档号为${tableCheckedKeys.value.map(item => item.fileNumber).join(',')}`
- ruleForm.value = {}
- showReplaceModal.value = true
- }
- const changeTab = ()=>{
- ruleForm.value = {}
- }
- const tabPosition = ref('1')
- const ruleFormRef = ref(null)
- const ruleForm = ref({})
- const saveReplaceLoad = ref(false)
- const saveReplace = async ()=>{
- const rows = tableCheckedKeys.value
- let ids = ''
- ids = arrToId(rows)
- // 保存前去除空格
- if (ruleForm.value.query) {
- ruleForm.value.query = ruleForm.value.query.trim()
- }
- if (ruleForm.value.replace) {
- ruleForm.value.replace = ruleForm.value.replace.trim()
- }
- saveReplaceLoad.value = true
- const { error, code, data, msg } = await tuningApi.findAndReplace({
- ...ruleForm.value,
- ids,
- type:tabPosition.value,
- })
-
- saveReplaceLoad.value = false
- if (!error && code === 200) {
- window.$message?.success(msg)
- showReplaceModal.value = false
- getTableData()
- } else {
- window.$message?.warning(msg)
- }
- }
- //并卷
- 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,
- type:1,
-
- })
- combinationClickLoading.value = false
- if (!error && code === 200) {
- window.$message?.success(msg)
- getTableData()
- mergeModal.value = false
- mergeModalBeforeClose()
- } else {
- window.$message?.error(msg)
- }
- }
- const mergeModalBefore = ref(false)
- const mergeModalBeforeLoading = ref(false)
- const mergeModalBeforeClose = ()=>{
- mergeModalBefore.value = false
- mergeModalBeforeType.value = ''
- }
- const mergeModalBeforeClick = async ()=>{
- if (!mergeModalBeforeType.value) return window.$message?.warning('请选择并卷方式')
- if (mergeModalBeforeType.value === '1') {
- mergeModal.value = true
- mergeInput.value = ''
- } else {
-
- mergeModalBeforeLoading.value = true
- let ids = ''
- const rows = tableCheckedKeys.value
- ids = rowsToId(rows)
- const { error, code, data, msg } = await tuningApi.reCreateArchiveAuto({
- ids: ids,
- type:2,
-
- })
- mergeModalBeforeLoading.value = false
- if (!error && code === 200) {
- window.$message?.success(msg)
- getTableData()
-
- mergeModalBeforeClose()
- } else {
- window.$message?.error(msg)
- }
- }
- }
- const mergeModalBeforeType = ref('')
- 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)
- mergeModalBefore.value = true
- // mergeModal.value = true
- // mergeInput.value = ''
- }
- const mergeDataColumn = [
- { key: 'fileNumber', name: '档号', width: 160, align: 'center' },
- { key: 'name', name: '案卷题名', align: 'center' },
-
- ]
- const aiLoading = ref(false)
- const AiClick = async ()=>{
- // 检查是否有被锁定的案卷
- const lockedArchives = tableCheckedKeys.value.filter(item => item.isLock === 1)
- if (lockedArchives.length > 0) {
- window.$message.warning('选择的案卷中包含被锁定的项,无法进行AI题名')
- return
- }
- let ids = ''
- const rows = tableCheckedKeys.value
- ids = rowsToId(rows)
- aiLoading.value = true
- const { error, code, data, msg } = await aiApi.creatFileNameFormAI({
- ids: ids,
- projectId:projectId.value,
- contractId:contractId.value,
-
- })
- aiLoading.value = false
- if (!error && code === 200) {
- window.$message?.success(msg)
- getTableData()
-
- } else {
- window.$message?.error(msg)
- }
- }
- const taskInfoList = ref([])
- const getInfoDetailClick = (item)=>{
- console.log('详情')
-
- const { status } = item
- if (status === 1) return
- router.push({ path: '/archives/manage/ai', query:{ taskId:item.taskId } })//ai
- }
- const taskListLoad = ref(false)
- const getTaskInfoList = async ()=>{
- taskListLoad.value = true
- const { error, code, data } = await aiApi.getArchiveAiTask({
-
- projectId: projectId.value,
- contractId: contractId.value,
-
- })
- taskListLoad.value = false
- if (!error && code === 200) {
- taskInfoList.value = getArrValue(data)
-
- } else {
- taskInfoList.value = []
-
-
- }
- }
- const delClick = (item)=>{
- HcDelMsg(async (resolve) => {
- const { error, code, msg } = await aiApi.deletedArchiveAiTask({
- taskId: item.taskId,
-
- })
- if (!error && code === 200) {
- window.$message?.success(msg)
- getTaskInfoList()
- }
- resolve() //关闭弹窗的回调
- })
- }
- //排序
- const sortModalDialog = ref(false)
- const sortModalDialogLoading = ref(false)
- const sortModalDialogClick = async () => {
- const { error, code, msg } = await tuningApi.sortRule({
- type: sortTypeVal.value,
- projectId: projectId.value,
-
- })
- if (!error && code === 200) {
- window.$message?.success(msg)
- sortModalDialogClose()
- getTableData()
- }
- }
- const sortModalDialogClose = ()=>{
- sortModalDialog.value = false
- sortTypeVal.value = '1' // 重置排序类型
- }
- const tableSortClick = () => {
- console.log('排序')
- sortModalDialog.value = true
-
- }
- const sortTypeVal = ref('1')
- //查阅案卷// 2. 添加组件引用
- const spotChecksDrawer = ref(false)
- const fileId = ref('')//案卷id
- const checkmetaFileId = ref('')//卷内文件id
- const consultFileClick = (row) => {
- spotChecksDrawer.value = true
- fileId.value = row.id || ''
- checkmetaFileId.value = ''
- }
- //关闭抽查
- const onCarrySpotChecksClose = () => {
- spotChecksDrawer.value = false
- fileId.value = ''
- checkmetaFileId.value = ''
- }
- //编辑卷内文件的查找替换
- const saveReplaceLoadCollect = ref(false)
- const showReplaceModalCollect = ref(false)
- const ruleFormCollect = ref({})
- const replaceClickCollect = ()=>{
-
- if (tableCheckedKeysUpload.value.length === 0) {
- window.$message?.warning('请选择需要更新的案卷')
- return
- }
- // 检查是否有被锁定的案卷
- const lockedArchives = tableUploadData.value.filter(item => item.isLock === 1)
- if (lockedArchives.length > 0) {
- window.$message.warning('选择的案卷中包含被锁定的项,无法操作')
- return
- }
-
- showReplaceModalCollect.value = true
- ruleFormCollect.value = {}
- }
- const saveReplaceCollect = async ()=>{
- const rows = tableCheckedKeysUpload.value
- let ids = ''
- ids = arrToId(rows)
- // 保存前去除空格
- if (ruleFormCollect.value.query) {
- ruleFormCollect.value.query = ruleFormCollect.value.query.trim()
- }
- if (ruleFormCollect.value.replace) {
- ruleFormCollect.value.replace = ruleFormCollect.value.replace.trim()
- }
-
- saveReplaceLoadCollect.value = true
- const { error, code, data, msg } = await archiveFileApiCollect.findAndReplace({
- ...ruleFormCollect.value,
- ids,
- type:tabPositionCollect.value,
- })
-
- saveReplaceLoadCollect.value = false
- if (!error && code === 200) {
- window.$message?.success(msg)
- showReplaceModalCollect.value = false
- await getintableData()
-
- intableData.value.forEach(item=>{
- tableUploadData.value.forEach(ele=>{
- if (item.id === ele.id) {
- ele.fileName = item.fileName
- }
- })
- })
- tableUploadRef.value.clearSelection()
-
- } else {
- window.$message?.warning(msg)
- }
-
- }
- const replaceTitleCollect = ref('查找替换')
- const tabPositionCollect = ref('1')
- const insertClick = ()=>{
- fileInsertModalRef.value?.openInsertDialog(intableCheckedKeys.value, searchForm.value.nodeIds, checkInid.value)
- }
- const fileInsertModalRef = ref(null)
- const closeFileModal = ()=>{
- tableFileRef.value?.clearSelection()
- }
- </script>
- <style lang="scss" scoped>
- @import '~style/archives/tuning.scss';
- // @import '~style/file/scoped/collection.scss';
- </style>
- <style lang="scss">
- // @import '~style/file/collection.scss';
- @import '~src/styles/theme/archives/tuning.scss';
- .hover-hand {
- cursor: pointer;
- }
- .panel-body .el-checkbox {
- white-space: normal;
- height: auto;
- }
- .text-disable {
- cursor: not-allowed;
- opacity: 0.6; /* 可选,添加透明度以视觉区分 */
- pointer-events: none; /* 阻止所有指针事件 */
- }
- </style>
- <style lang="scss" scoped>
- @import '~style/archives/tuning.scss';
- .flex-container {
- display: flex;
- flex-direction: column;
- height: 100%;
- }
- .hc-c-table-box {
- flex: 1; /* 默认占据所有空间 */
- overflow-y: auto; /* 允许垂直滚动 */
- }
- .hc-f-table-box {
- flex: 0; /* 初始时不占据空间 */
- overflow-y: auto; /* 允许垂直滚动 */
- transition: flex 0.3s ease; /* 添加过渡效果 */
- }
- .drag-icon {
- cursor: ns-resize;
- user-select: none;
- position: absolute;
- right: 20px;
- top: 10px;
- }
- .replace-dialog-content{
- background-color:#E9E9E9;
- padding: 15px;
- }
- </style>
- <style>
- .blue-text .el-textarea__inner {
- color: #409eff;
- }
- </style>
- <style lang="scss">
- html.dark{
- .replace-dialog-content{
- background-color:transparent;
- padding: 15px;
- }
- }
- </style>
- <style lang="scss" scoped>
- .task-info{
- display: flex;
- flex-direction: column;
- justify-content:center;
- align-items: center;
- padding: 15px;
- border-radius: 4px;
- max-height: 300px;
- overflow-y:auto ;
- .task-info-item{
-
- font-weight: bolder;
- display: flex;
- align-items: center;
- justify-content: space-evenly;
- width: 100%;
- color: rgba(63, 158, 255, 1);
- cursor: pointer;
- margin-top: 10px;
- }
- }
- </style>
- <style lang="scss" scoped>
- .view-file-link {
- color: var(--el-color-primary);
- &:hover {
- color: var(--el-color-primary-light-3);
- }
- }
- </style>
|