query.vue 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553
  1. <template>
  2. <div class="hc-page-box" id="carry-spot-checks-layout-target">
  3. <HcCard ui="hc-query-card-box" v-show="!isCarrySpotChecksDrawer">
  4. <div v-if="isShowheader" class="flex_box">
  5. <div class="hc-arrow-icon">
  6. <HcIcon name="arrow-left-s"/>
  7. </div>
  8. <div class="hc-tag-box">
  9. <el-scrollbar>
  10. <div class="scrollbar-content">
  11. <template v-for="item in tags">
  12. <el-tag class="mx-1" closable effect="light" size="large" @close="deltag(item)">{{ item.name }}</el-tag>
  13. </template>
  14. </div>
  15. </el-scrollbar>
  16. </div>
  17. <div class="hc-arrow-icon">
  18. <HcIcon name="arrow-right-s"/>
  19. </div>
  20. </div>
  21. <div class="hc-query-input-box">
  22. <el-input placeholder="可按关键字模糊搜索,多个关键字用“,” 隔开" v-model="searchInput" clearable @clear="clearinput">
  23. <template #prepend>
  24. <div class="prepend-filtering" @click="filteringClick">
  25. <span class="name">条件筛选</span>
  26. <HcIcon name="arrow-up-double" v-if="filteringShow === 'show'"/>
  27. <HcIcon name="arrow-down-double" v-else/>
  28. </div>
  29. </template>
  30. <template #append>
  31. <div class="append-search-btn-box">
  32. <el-button type="primary" class="search-btn" @click="searchCaseClick('1')">
  33. 按案卷查询
  34. </el-button>
  35. <el-button type="primary" class="search-btn" @click="searchFileClick('2')">
  36. 按文件查询
  37. </el-button>
  38. </div>
  39. </template>
  40. </el-input>
  41. </div>
  42. <div class="hc-query-filtering-collapse-box">
  43. <el-collapse v-model="filteringShow" @change="filteringChange" accordion>
  44. <el-collapse-item name="show">
  45. <div class="hc-search-hot-key">
  46. <span>热门搜索词汇:</span>
  47. <span class="text-hover ml-4" v-for="item in hotInputlist" @click="clickHottitle(item)">{{ item.name }}</span>
  48. </div>
  49. <div class="hc-search-screening-item">
  50. <div class="title">年度:</div>
  51. <template v-for="item in annuals">
  52. <div class="screening-key" :class="isArrIndex(annual,'key', item.key) ? 'cut': ''" @click="annualClick(item)">{{item.name}}</div>
  53. </template>
  54. </div>
  55. <div class="hc-search-screening-item">
  56. <div class="title">月份:</div>
  57. <template v-for="item in months">
  58. <div class="screening-key" :class="isArrIndex(month,'key', item.key) ? 'cut': ''" @click="monthClick(item)">{{item.name}}</div>
  59. </template>
  60. </div>
  61. <div class="hc-search-screening-item">
  62. <div class="title">期限:</div>
  63. <template v-for="item in deadlines">
  64. <div class="screening-key" :class="isArrIndex(deadline,'key', item.key) ? 'cut': ''" @click="deadlineClick(item)">{{item.name}}</div>
  65. </template>
  66. </div>
  67. <div class="hc-search-screening-item">
  68. <div class="title">密级:</div>
  69. <template v-for="item in securitys">
  70. <div class="screening-key" :class="isArrIndex(security,'key', item.key) ? 'cut': ''" @click="securityClick(item)">{{item.name}}</div>
  71. </template>
  72. </div>
  73. <div class="hc-search-screening-item">
  74. <div class="title">类别:</div>
  75. <template v-for="item in classess">
  76. <div class="screening-key" :class="isArrIndex(classes,'key', item.key) ? 'cut': ''" @click="classesClick(item)">{{item.name}}</div>
  77. </template>
  78. </div>
  79. <div class="hc-search-screening-item mb-4">
  80. <div class="title">目录:</div>
  81. <div class="screening-key text-link" @click="nodeTreeClick">
  82. <HcIcon name="node-tree" :line="false"/>
  83. <span class="ml-1">目录树</span>
  84. </div>
  85. </div>
  86. </el-collapse-item>
  87. </el-collapse>
  88. </div>
  89. <div class="hc-query-content-header-box">
  90. <div class="header">
  91. <HcNewSwitch :datas="tabData" :keys="tabKey" @change="tabChange" :round="false"/>
  92. </div>
  93. <div class="extra">
  94. <el-button v-if="tabKey === 'tab1'">
  95. <HcIcon name="download"/>
  96. <span>下载</span>
  97. </el-button>
  98. <HcNewSwitch :datas="tabGuiData" :keys="tabGuiKey" @change="tabGuiChange" v-if="tabKey === 'tab2'"/>
  99. </div>
  100. </div>
  101. <div class="hc-gather-card-box" :class="tableAllShow?'file-table':''" v-if="tabKey === 'tab1'">
  102. <HcCardItem ui="hc-card-item-main">
  103. <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCurrentRow isCheck @selection-change="tableSelection" @row-click="tableRowClick" :ui="hoverHand?'hover-hand':''">
  104. <template #action="{row,index}">
  105. <el-button type="primary" size="small" @click.stop="consultFileClick(row,1)">查阅案卷</el-button>
  106. </template>
  107. </HcTable>
  108. <template #action>
  109. <HcPages :pages="searchForm" @change="pageChange"/>
  110. </template>
  111. </HcCardItem>
  112. <HcCardItem ui="hc-card-item-file" title="卷内文件">
  113. <template #extra>
  114. <div class="hc-icon-close text-hover" @click="tableFileCloseClick">
  115. <HcIcon name="close"/>
  116. </div>
  117. </template>
  118. <HcTable ref="tableFileRef" :column="tableFileColumn" :datas="tableFileData" :loading="tableFileLoading" isCheck @selection-change="tableFileSelection">
  119. <template #action="{row,index}">
  120. <el-button type="primary" size="small" @click.stop="consultFileClick(row,2)">查阅文件</el-button>
  121. </template>
  122. <!-- <template #fileName="{row}">
  123. <span class="text-link text-hover" @click="viewfilePdf(row)">{{ row?.fileName }}</span>
  124. </template> -->
  125. </HcTable>
  126. <!-- <template #action>
  127. <HcPages :pages="InsearchForm" @change="InpageChange"/>
  128. </template> -->
  129. </HcCardItem>
  130. </div>
  131. <!--档案柜-->
  132. <div class="hc-gather-card-box">
  133. <HcCardItem ui="hc-card-item-main" v-if="tabKey === 'tab2'">
  134. <el-carousel class="hc-file-cabinet" :autoplay="false" :loop="false" indicator-position="none">
  135. <el-carousel-item v-for="item in guiItemData">
  136. <div class="hc-file-cabinet-gui">
  137. <div class="gui-item" v-for="items in item.children">
  138. <el-popover effect="dark" placement="top" :title="items.name + '柜'" :width="200"
  139. :hide-after="0" :offset="-10" :content="items.content">
  140. <template #reference>
  141. <div class="gui-view" @click="guiItemClick(items)">
  142. <img :src="imageViewGui" alt="">
  143. <span class="num">{{items.name}}</span>
  144. </div>
  145. </template>
  146. </el-popover>
  147. </div>
  148. </div>
  149. </el-carousel-item>
  150. </el-carousel>
  151. </HcCardItem>
  152. </div>
  153. </HcCard>
  154. <!--柜子侧面-->
  155. <HcDrawer :show="isGuiInfoDrawer"
  156. direction="rtl"
  157. to-id="carry-spot-checks-layout-target"
  158. uis="hc-carry-spot-checks-target"
  159. @close="onCloseGuiInfoDrawer">
  160. <template #header>
  161. <div class="w-96">
  162. <el-input size="large" v-model="searchForm.queryValue" placeholder="请输入关键词检索" clearable/>
  163. </div>
  164. <div class="ml-2">
  165. <el-button type="primary" size="large">
  166. <HcIcon name="search-2"/>
  167. <span>搜索</span>
  168. </el-button>
  169. </div>
  170. </template>
  171. <div class="hc-gui-info-drawer">
  172. <div class="hc-gui-info-img">
  173. <div class="gui-info-img">
  174. <img :src="imageViewGui1" alt="">
  175. <div class="gui-file-item-box">
  176. <div class="gui-file-item" v-for="item in guiInfoData">
  177. <template v-for="(items, index) in item.children">
  178. <!-- query 为搜索后的结果进行选中,cur 为点击的选中-->
  179. <div class="item"
  180. :class="[index === 2 || index === 5 ?'query': '', guiInfoCurKey=== items.id ? 'cur' : '']"
  181. @click="guiFileInfo(items)"
  182. >{{items.name}}</div>
  183. </template>
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. <div class="hc-gui-info-data">
  189. <div class="hc-gui-data-container">
  190. <el-scrollbar>
  191. <div class="info-item">
  192. <div class="title">案卷题名:</div>
  193. <div class="text">安康至来凤国家高速公路奉节至巫山(渝鄂界)段干岩洞隧道LK3+425~LK3+393初期支护钢筋网分项开工报告、检验申请批复单、质量检验报告单、记录表、试验检测记录及评定报告、中间交工证书</div>
  194. </div>
  195. <div class="info-item">
  196. <div class="title">
  197. <span>密</span>
  198. <span>级:</span>
  199. </div>
  200. <div class="text">机密</div>
  201. </div>
  202. <div class="info-item">
  203. <div class="title">保管期限:</div>
  204. <div class="text">永久</div>
  205. </div>
  206. <div class="info-item">
  207. <div class="title">卷内文件:</div>
  208. <div class="text">9</div>
  209. </div>
  210. <div class="info-item">
  211. <div class="title">起止日期:</div>
  212. <div class="text">2022.02.12~2023.11.02</div>
  213. </div>
  214. <div class="info-item">
  215. <div class="title">立卷单位:</div>
  216. <div class="text">贵州路桥集团xxxxx</div>
  217. </div>
  218. </el-scrollbar>
  219. </div>
  220. <div class="btn-box">
  221. <el-button size="large" type="primary">打开案卷</el-button>
  222. <el-button size="large" @click="onCloseGuiInfoDrawer">
  223. <HcIcon name="close"/>
  224. <span>关闭</span>
  225. </el-button>
  226. </div>
  227. </div>
  228. </div>
  229. </HcDrawer>
  230. <!--展开抽查-->
  231. <HcDrawer :show="isCarrySpotChecksDrawer" uis="hc-carry-spot-checks-target" to-id="carry-spot-checks-layout-target" @close="onCarrySpotChecksDrawerClose">
  232. <div class="hc-carry-spot-checks-pdf">
  233. <!-- <HcPdf src="https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221212/ce9799c7d18efc03efefd6f242439f2e.pdf"/> -->
  234. <HcPdf :src="pdfUrl" v-loading="pdfLoading" />
  235. <el-tooltip content="展开/收起 右侧目录" placement="top" :disabled="!isBubble">
  236. <div class="hc-csc-pdf-btn" @click="onCarryDataShow">
  237. <HcIcon name="arrow-right-s" v-show="isCarryDataShow"/>
  238. <HcIcon name="arrow-left-s" v-show="!isCarryDataShow"/>
  239. </div>
  240. </el-tooltip>
  241. </div>
  242. <div class="hc-carry-spot-checks-data" v-show="isCarryDataShow">
  243. <div class="hc-csc-switch">
  244. <HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" @change="tabTypeChange" size="default" :round="false"/>
  245. </div>
  246. <div class="hc-csc-info-box">
  247. <el-scrollbar>
  248. <div class="hc-info-text-item">
  249. <div class="title">案卷题名:</div>
  250. <div class="content">{{ fileInfo.name }}</div>
  251. </div>
  252. <div class="hc-info-text-item">
  253. <div class="title">
  254. <span>密</span>
  255. <span class="ml-7">级:</span>
  256. </div>
  257. <div class="content">{{ fileInfo.secretLevelValue }}</div>
  258. </div>
  259. <div class="hc-info-text-item">
  260. <div class="title">保管期限:</div>
  261. <div class="content">{{ fileInfo.storageTimeValue }}</div>
  262. </div>
  263. <div class="hc-info-text-item">
  264. <div class="title">卷内文件:</div>
  265. <div class="content">{{ fileInfo.pageNumber }}</div>
  266. </div>
  267. <div class="hc-info-text-item">
  268. <div class="title">起止日期:</div>
  269. <div class="content" v-if="fileInfo?.endDate!==''||fileInfo?.startDate!==''">{{ splitDate(fileInfo?.startDate)+"~"+ splitDate(fileInfo?.endDate)}}</div>
  270. <div class="content" v-else></div>
  271. </div>
  272. <div class="hc-info-text-item">
  273. <div class="title">立卷单位:</div>
  274. <div class="content">{{ fileInfo.unit }}</div>
  275. </div>
  276. </el-scrollbar>
  277. </div>
  278. <div class="hc-csc-data-box">
  279. <HcTable :column="cscTableColumn1" :datas="cscTableData1" :loading="cscTableLoading" :isArrIndex="false" v-if="tabTypeKey === 'tab1'">
  280. <template #name="{row}">
  281. <div :class="row.id === checkId ? 'text-link' : 'text-hover'" @click="changePdf(row)">{{row?.fileName}}</div>
  282. </template>
  283. </HcTable>
  284. <HcTable :column="cscTableColumn2" :datas="cscTableData2" :loading="cscTableLoading" :isArrIndex="false" v-if="tabTypeKey === 'tab2'">
  285. <template #name="{row}">
  286. <div :class="row.id === 2 ? 'text-link' : 'text-hover'">{{row?.name}}</div>
  287. </template>
  288. </HcTable>
  289. <HcTable :column="cscTableColumn3" :datas="cscTableData3" :loading="cscTableLoading" :isArrIndex="false" v-if="tabTypeKey === 'tab3'">
  290. <template #name="{row}">
  291. <div :class="row.id === 2 ? 'text-link' : 'text-hover'">{{row?.name}}</div>
  292. </template>
  293. </HcTable>
  294. <HcTable :column="cscTableColumn4" :datas="cscTableData4" :loading="cscTableLoading" :isArrIndex="false" v-if="tabTypeKey === 'tab4'">
  295. <template #name="{row}">
  296. <div class="hc-csc-associated-row" :class="row.id === 2 ? 'text-link' : 'text-hover'">
  297. <el-tag effect="dark">{{row?.tag}}</el-tag>
  298. <span class="ml-3">{{row?.name}}</span>
  299. </div>
  300. </template>
  301. </HcTable>
  302. <MetaTable :loading="cscTableLoading" v-if="tabTypeKey === 'tab5'" :ishowFile="checkId.length>0?true:false"/>
  303. <HcTable :column="cscTableColumn5" :datas="cscTableData5" :loading="cscTableLoading" v-if="tabTypeKey === 'tab6'"/>
  304. <el-tooltip content="使用弹窗查看数据" placement="top" :disabled="!isBubble" v-if="tabTypeKey === 'tab6' || tabTypeKey === 'tab5'">
  305. <div class="hc-table-info-btn" @click="cscTableDataModalShow">
  306. <HcIcon name="airplay"/>
  307. </div>
  308. </el-tooltip>
  309. </div>
  310. <div class="hc-csc-action-box">
  311. <div class="btn-box">
  312. <el-button hc-btn @click="onCarrySpotChecksDrawerClose">
  313. <HcIcon name="close"/>
  314. <span>取消查阅</span>
  315. </el-button>
  316. </div>
  317. </div>
  318. </div>
  319. </HcDrawer>
  320. <!--使用弹窗查看数据-->
  321. <HcDialog :show="cscTableDataModal" :title="cscTableDataTitle" widths="1080px" isTable :footer="false" @close="cscTableDataModalClose">
  322. <MetaTable :loading="cscTableLoading" v-if="tabTypeKey === 'tab5'"/>
  323. <HcTable :column="cscTableColumn51" :datas="cscTableData5" :loading="cscTableLoading" v-if="tabTypeKey === 'tab6'"/>
  324. </HcDialog>
  325. <!--目录树-->
  326. <HcDialog :show="nodeTreeModal" widths="1080px" isTable saveText="确认" :isClose="false" @close="nodeTreeModalClose" @save="nodeTreeModalSave" >
  327. <template #header>
  328. <div role="heading" class="el-dialog__title">
  329. <span class="mr-3">选择目录</span>
  330. <span class="text-sm text-orange">点击左侧黄色文件夹可展开下一级</span>
  331. </div>
  332. </template>
  333. <template #extra>
  334. <HcNewSwitch :datas="nodeTabData" :keys="nodeTabKey" @change="nodeTabChange" :round="false"/>
  335. </template>
  336. <el-collapse class="hc-node-tree-collapse" v-model="activeName" accordion @change="collapseChange" v-loading="nodeTreeArrLoad">
  337. <template v-for="(item) in nodeTreeArr">
  338. <el-collapse-item :name="item.id.toString()" :disabled="item.notExsitChild===true">
  339. <template #title>
  340. <div class="hc-collapse-item-title">
  341. <el-checkbox v-model="item.checkColId" style="font-size: 24px;" @change="changeCheckColId(item)" ></el-checkbox>
  342. <HcIcon name="file" fill class="icon" v-if="item.notExsitChild===true"/>
  343. <HcIcon name="folder-3" fill class="icon" v-else/>
  344. <span class="title">{{item.nodeName}}</span>
  345. </div>
  346. </template>
  347. <!-- <HcNodeTree :projectId="projectId" :contractId="contractId"/> -->
  348. <el-tree
  349. class="col_tree"
  350. node-key="id"
  351. ref="nodetreeEl"
  352. :props="defaultProps"
  353. show-checkbox
  354. v-loading="nodetreeElloading"
  355. lazy
  356. :load="loadNode"
  357. :data="Nodetreedata"
  358. >
  359. <template #default="{ node, data }">
  360. <span class="custom-tree-node">
  361. <HcIcon name="file" fill class="icon" style="color: #FFAF2D;" v-if="data.notExsitChild===true"/>
  362. <HcIcon name="folder-3" fill class="icon" style="color: #FFAF2D;" v-else/><span>{{ node.label }}</span>
  363. </span>
  364. </template>
  365. </el-tree>
  366. </el-collapse-item>
  367. </template>
  368. </el-collapse>
  369. <HcNoData v-if="nodeTreeArr.length==0"/>
  370. </HcDialog>
  371. </div>
  372. </template>
  373. <script setup>
  374. import {ref, nextTick, onMounted, watch} from "vue";
  375. import {useAppStore} from "~src/store";
  376. import MetaTable from "../transfer/components/meta-table.vue"
  377. import HcNodeTree from "./components/query/hc-tree.vue"
  378. // import HcNodeTree from "~src/components/tree/hc-tree-1.vue"
  379. import {getArrValue, arrIndex, isArrIndex} from "js-fast-way"
  380. import website from '~src/config/index'
  381. import archiveQueryApi from "~api/using/query.js";
  382. import tuningApi from "~api/archiveConfig/tuning.js";
  383. import imageViewGui from "~src/assets/view/gui.png";
  384. import imageViewGui1 from "~src/assets/view/gui1.png";
  385. //变量
  386. const useAppState = useAppStore()
  387. const projectId = ref(useAppState.getProjectId);
  388. const contractId = ref(useAppState.getContractId);
  389. const projectInfo = ref(useAppState.getProjectInfo);
  390. const isBubble = ref(useAppState.getBubble);
  391. const userRoleId = ref(useAppState.getRoleId);
  392. const hoverHand = ref(true)
  393. const isShowheader = ref(false)
  394. const tags = ref([])
  395. //监听
  396. watch(() => [
  397. useAppState.getBubble,tags.value
  398. ], ([bubble,Tags]) => {
  399. isBubble.value = bubble
  400. if(Tags.length==0){
  401. isShowheader.value=false
  402. }else{
  403. isShowheader.value=true
  404. }
  405. })
  406. //渲染完成
  407. onMounted(() => {
  408. getCarrierTypeByDictdata()
  409. setAnnuals()
  410. setMonths()
  411. getTableData()
  412. })
  413. //截取日期
  414. const splitDate=(val)=>{
  415. return val.substring( 0,10)
  416. }
  417. //处理数据
  418. const rowsToArr = (rows) => {
  419. let newArr = [];
  420. for (let i = 0; i < rows.length; i++) {
  421. newArr.push(rows[i]?.key)
  422. }
  423. return newArr.join(',')
  424. }
  425. const deltag=(item)=>{
  426. tags.value=tags.value.filter((ele)=>{
  427. if(item.name!==ele.name){
  428. return item
  429. }
  430. })
  431. //设置年份
  432. annual.value=annual.value.filter((ele)=>{
  433. if(item.name!==ele.name){
  434. return item
  435. }
  436. })
  437. yeararr.value=yeararr.value.filter((ele)=>{
  438. if(item.name!==ele.name){
  439. return item
  440. }
  441. })
  442. searchForm.value.year=rowsToArr(annual.value)
  443. if(annual.value.length==0){
  444. annual.value=[{key: 'all', name: '所有'}]
  445. }
  446. //设置月份
  447. month.value=month.value.filter((ele)=>{
  448. if(item.name!==ele.name){
  449. return item
  450. }
  451. })
  452. montharr.value=montharr.value.filter((ele)=>{
  453. if(item.name!==ele.name){
  454. return item
  455. }
  456. })
  457. searchForm.value.month=rowsToArr(month.value)
  458. if(month.value.length==0){
  459. month.value=[{key: 'all', name: '所有'}]
  460. }
  461. //设置保管期限
  462. deadline.value=deadline.value.filter((ele)=>{
  463. if(item.name!==ele.name){
  464. return item
  465. }
  466. })
  467. deadlinearr.value=deadlinearr.value.filter((ele)=>{
  468. if(item.name!==ele.name){
  469. return item
  470. }
  471. })
  472. searchForm.value.storageTime=rowsToArr(deadline.value)
  473. if(deadline.value.length==0){
  474. deadline.value=[{key: 'all', name: '所有'}]
  475. }
  476. //设置密级
  477. security.value=security.value.filter((ele)=>{
  478. if(item.name!==ele.name){
  479. return item
  480. }
  481. })
  482. securityarr.value=securityarr.value.filter((ele)=>{
  483. if(item.name!==ele.name){
  484. return item
  485. }
  486. })
  487. searchForm.value.secretLevel=rowsToArr(security.value)
  488. if(security.value.length==0){
  489. security.value=[{key: 'all', name: '所有'}]
  490. }
  491. //设置类别
  492. classes.value=classes.value.filter((ele)=>{
  493. if(item.name!==ele.name){
  494. return item
  495. }
  496. })
  497. classesarr.value=classesarr.value.filter((ele)=>{
  498. if(item.name!==ele.name){
  499. return item
  500. }
  501. })
  502. searchForm.value.carrierType=rowsToArr(classes.value)
  503. if(classes.value.length==0){
  504. classes.value=[{key: 'all', name: '所有'}]
  505. }
  506. }
  507. //搜索表单
  508. const searchForm = ref({
  509. current: 1, size: 20, total: 0, searchType:"1", listType: 1, archiveType: '',
  510. })
  511. //卷内文件
  512. const InsearchForm = ref({
  513. current: 1, size: 20, total: 0
  514. })
  515. //热门搜索词汇
  516. const hotInputlist=ref([
  517. {name:'文件名'},
  518. {name:'案卷名'},
  519. {name:'档号'},
  520. {name:'单位'},
  521. ])
  522. const clickHottitle=(item)=>{
  523. searchInput.value=item.name
  524. searchForm.value.queryValue=item.name
  525. }
  526. const clearinput=()=>{
  527. searchForm.value.searchType='1'
  528. getTableData()
  529. }
  530. //年度
  531. const annuals = ref([])
  532. const setAnnuals = () => {
  533. let annualArr = [{key: 'all', name: '所有'}]
  534. const year = new Date().getFullYear()
  535. for (let i = 0; i < 8; i++) {
  536. const item = year - i + ''
  537. annualArr.push({
  538. key: item,
  539. name: item+'年'
  540. })
  541. }
  542. annuals.value = annualArr
  543. }
  544. //数组去重
  545. const some=(arr)=> {
  546. let some= [];
  547. arr.forEach(el => {
  548. if (!some.some(e => e.name == el.name)) {
  549. some.push(el);
  550. }
  551. });
  552. return some
  553. }
  554. const allarr=ref([])
  555. const montharr=ref([])
  556. const yeararr=ref([])
  557. const deadlinearr=ref([])
  558. const securityarr=ref([])
  559. const classesarr=ref([])
  560. const setTags=(val,type)=>{
  561. let arr=[]
  562. val.forEach((item)=>{
  563. if(item.name!=='所有'){
  564. arr.push({name:item.name})
  565. }
  566. })
  567. let filarr=some(arr)
  568. if(type==='month'){
  569. montharr.value=some(filarr)
  570. if(montharr.value.length==0){
  571. month.value=[{key: 'all', name: '所有'}]
  572. }
  573. }else if(type==='year'){
  574. yeararr.value=some(filarr)
  575. if(yeararr.value.length==0){
  576. annual.value=[{key: 'all', name: '所有'}]
  577. }
  578. }else if(type==='deadline'){
  579. deadlinearr.value=some(filarr)
  580. if(deadlinearr.value.length==0){
  581. deadline.value=[{key: 'all', name: '所有'}]
  582. }
  583. }else if(type==='security'){
  584. securityarr.value=some(filarr)
  585. if(securityarr.value.length==0){
  586. security.value=[{key: 'all', name: '所有'}]
  587. }
  588. }else if(type==='classes'){
  589. classesarr.value=some(filarr)
  590. if(classesarr.value.length==0){
  591. classes.value=[{key: 'all', name: '所有'}]
  592. }
  593. }
  594. let finalarr=[]
  595. yeararr.value.forEach((item)=>{
  596. finalarr.push({name:item.name})
  597. })
  598. montharr.value.forEach((item)=>{
  599. finalarr.push({name:item.name})
  600. })
  601. deadlinearr.value.forEach((item)=>{
  602. finalarr.push({name:item.name})
  603. })
  604. securityarr.value.forEach((item)=>{
  605. finalarr.push({name:item.name})
  606. })
  607. classesarr.value.forEach((item)=>{
  608. finalarr.push({name:item.name})
  609. })
  610. tags.value=some(finalarr)
  611. }
  612. const annual = ref([{key: 'all', name: '所有'}])
  613. const annualClick = (item) => {
  614. annual.value = setQueryFiltering(annual.value, item)
  615. setTags(annual.value,'year')
  616. searchForm.value.year=item.name;
  617. let arr=[]
  618. annual.value.forEach((item)=>{
  619. arr.push(item.key)
  620. })
  621. searchForm.value.year=arr+''
  622. }
  623. //月份
  624. const months = ref([])
  625. const setMonths = () => {
  626. let monthArr = [{key: 'all', name: '所有'}]
  627. for (let i = 0; i < 12; i++) {
  628. let item = (i + 1) + ''
  629. item.length === 1 && (item = item)
  630. monthArr.push({
  631. key: item,
  632. name: item + '月'
  633. })
  634. }
  635. months.value = monthArr
  636. }
  637. const month = ref([{key: 'all', name: '所有'}])
  638. const monthClick = (item) => {
  639. month.value = setQueryFiltering(month.value, item)
  640. setTags(month.value,'month')
  641. let arr=[]
  642. month.value.forEach((item)=>{
  643. arr.push(item.key)
  644. })
  645. searchForm.value.month=arr+''
  646. }
  647. //期限
  648. const deadline = ref([{key: 'all', name: '所有'}])
  649. const deadlines = ref([
  650. {key: 'all', name: '所有'},
  651. {key: '3', name: '永久'},
  652. {key: '2', name: '30年'},
  653. {key: '1', name: '10年'}
  654. ])
  655. const deadlineClick = (item) => {
  656. deadline.value = setQueryFiltering(deadline.value, item)
  657. setTags(deadline.value,'deadline')
  658. let arr=[]
  659. deadline.value.forEach((item)=>{
  660. arr.push(item.key)
  661. })
  662. searchForm.value.storageTime=arr+''
  663. }
  664. //密级
  665. const security = ref([{key: 'all', name: '所有'}])
  666. const securitys = ref([
  667. {key: 'all', name: '所有'},
  668. {key: '1',name: '机密'},
  669. {key: '2',name: '绝密'},
  670. {key: '3',name: '秘密'},
  671. {key: '4',name: '公开'},
  672. ])
  673. const securityClick = (item) => {
  674. security.value = setQueryFiltering(security.value, item)
  675. setTags(security.value,'security')
  676. let arr=[]
  677. security.value.forEach((item)=>{
  678. arr.push(item.key)
  679. })
  680. searchForm.value.secretLevel=arr+''
  681. }
  682. //类别
  683. const classes = ref([ {key: 'all', name: '所有'},])
  684. const classess = ref([ {key: 'all', name: '所有'},])
  685. const getCarrierTypeByDictdata=async()=>{
  686. const { error, code, data } = await archiveQueryApi.getCarrierTypeByDict()
  687. tableLoading.value = false
  688. if (!error && code === 200) {
  689. let arrdata=getArrValue(data)
  690. arrdata.forEach((ele)=>{
  691. classess.value.push({key:ele.dictKey,name:ele.dictValue})
  692. })
  693. }
  694. }
  695. const classesClick = (item) => {
  696. classes.value = setQueryFiltering(classes.value, item)
  697. setTags(classes.value,'classes')
  698. let arr=[]
  699. classes.value.forEach((item)=>{
  700. arr.push(item.key)
  701. })
  702. searchForm.value.carrierType=arr+''
  703. }
  704. //设置筛选条件
  705. const setQueryFiltering = (arr, {key, name}) => {
  706. if (key === 'all') {
  707. //如果选择所有,就删除其他
  708. arr = [{key, name}]
  709. tags.value= tags.value.filter((item)=>{
  710. if(item.name.indexOf===-1){
  711. return item
  712. }
  713. })
  714. } else {
  715. //选中还是取消
  716. const index = arrIndex(arr, 'key', key)
  717. if (index !== -1) {
  718. arr.splice(index, 1)
  719. } else {
  720. arr.push({key, name})
  721. }
  722. //如果存在所有,就删除所有。
  723. if (arr.length > 1) {
  724. const isAll = arrIndex(arr, 'key', 'all')
  725. if (isAll !== -1) {
  726. arr.splice(isAll, 1)
  727. }
  728. }
  729. }
  730. return arr
  731. }
  732. //目录树
  733. const nodeTreeClick = () => {
  734. nodeTreeModal.value = true
  735. getnodeTabData()
  736. }
  737. const nodeTreeModal = ref(false)
  738. const nodeTreeModalClose = () => {
  739. nodeTreeModal.value = false
  740. activeName.value=""
  741. }
  742. //确认
  743. const nodeTreeModalSave = () => {
  744. nodeTreeModal.value = false
  745. let keys= nodetreeEl.value[treeIndex.value].getCheckedKeys()
  746. searchForm.value.nodeIds=keys.join(',')||singleId.value
  747. }
  748. //搜索筛选
  749. const filteringShow = ref('')
  750. const filteringChange = (name) => {
  751. filteringShow.value = name
  752. }
  753. //条件筛选
  754. const filteringClick = () => {
  755. if (filteringShow.value) {
  756. filteringShow.value = ''
  757. } else {
  758. filteringShow.value = 'show'
  759. }
  760. }
  761. const searchInput=ref('')
  762. //按文件查询
  763. const searchFileClick = (type) => {
  764. filteringShow.value = ''
  765. searchForm.value.searchType=type
  766. getTableData()
  767. }
  768. //按案卷查询
  769. const searchCaseClick = (type) => {
  770. filteringShow.value = ''
  771. searchForm.value.searchType=type
  772. getTableData()
  773. }
  774. //tab数据和相关处理
  775. const tabKey = ref('tab1')
  776. const tabData = ref([
  777. {key:'tab1', name: '案卷列表'},
  778. {key:'tab2', name: '档案柜'},
  779. ]);
  780. const tabChange = (item) => {
  781. tabKey.value = item?.key;
  782. searchForm.value.listType = item?.key === 'tab1' ? 1 : 2
  783. searchForm.value.current = 1
  784. searchForm.value.archiveType = item?.key === 'tab2' ? tabGuiKey.value : ''
  785. getTableData()
  786. }
  787. //分页被点击
  788. const pageChange = ({current, size}) => {
  789. searchForm.value.current = current
  790. searchForm.value.size = size
  791. getTableData()
  792. }
  793. //分页被点击
  794. const InpageChange = ({current, size}) => {
  795. InsearchForm.value.current = current
  796. InsearchForm.value.size = size
  797. // getTableData()
  798. }
  799. //表头
  800. const tableRef = ref(null)
  801. const tableColumn = ref([
  802. {key:'fileNumber', name: '档号', width: 180},
  803. {key:'name', name: '题名'},
  804. {key:'secretLevelValue', name: '密级', width: 120},
  805. {key:'storageTimeValue', name: '保管期限', width: 120},
  806. {key:'pageN', name: '页数', width: 120},
  807. {key:'unit', name: '立卷单位', width: 260},
  808. {key:'action', name: '操作', width: 120},
  809. ])
  810. const tableData = ref([
  811. ])
  812. const pdfUrl=ref('')
  813. const pdfLoading=ref(false)
  814. const tableLoading = ref(false)
  815. const getTableData = async () => {
  816. tableLoading.value = true
  817. searchForm.value.queryValue=searchInput.value
  818. for (let key in searchForm.value) {
  819. if(searchForm.value[key]==='all'||searchForm.value[key]==='所有'){
  820. searchForm.value[key]=''
  821. }
  822. }
  823. const { error, code, data } = await archiveQueryApi.getarchiveQueryPage({
  824. ...searchForm.value,
  825. projectId: projectId.value,
  826. contractId:contractId.value
  827. })
  828. tableLoading.value = false
  829. if (!error && code === 200) {
  830. if (tabKey.value === 'tab1') {
  831. tableData.value = getArrValue(data['records'])
  832. searchForm.value.total = data['total'] || 0
  833. }
  834. } else {
  835. if (tabKey.value === 'tab1') {
  836. tableData.value = []
  837. searchForm.value.total = 0
  838. }
  839. }
  840. //案卷列表
  841. if (tabKey.value === 'tab1') {
  842. tableFileCloseClick()
  843. if(searchForm.value.searchType==='2'){
  844. if(tableData.value.length>0&&tableData.value[0]?.approvalFileList.length>0){
  845. // tableFileData.value =getArrValue( tableData.value[0]['approvalFileList'])
  846. let searchinput=searchForm.value.queryValue
  847. let allarr=getArrValue( tableData.value[0]['approvalFileList'])
  848. let filterarr=allarr.filter((item)=>{
  849. if(item.fileName.indexOf(searchinput)!=-1){
  850. return item
  851. }
  852. })
  853. tableFileData.value =getArrValue( filterarr)
  854. tableAllShow.value = true;
  855. tableFileShow.value = true;
  856. }
  857. }
  858. }
  859. }
  860. //多选
  861. const tableKeys = ref([]);
  862. const tableSelection = (rows) => {
  863. tableKeys.value = rows
  864. }
  865. const tableAllShow = ref(false)
  866. const tableAllShowClick = () => {
  867. tableFileShow.value = false;
  868. tableAllShow.value = !tableAllShow.value;
  869. }
  870. //表头
  871. const tableFileRef = ref(null)
  872. const tableFileColumn = ref([
  873. {key:'fileNumber', name: '文件编号', width: 180},
  874. {key:'fileName', name: '文件题名'},
  875. {key:'fileTime', name: '文件日期', width: 120},
  876. {key:'dutyUser', name: '责任者', width: 120},
  877. {key:'filePage', name: '页数', width: 120},
  878. {key:'action', name: '操作', width: 120},
  879. ])
  880. const tableFileData = ref([
  881. ])
  882. //查看卷内文件pdf
  883. // const viewfilePdf=(row)=>{
  884. // if(row?.pdfFileUrl){
  885. // window.open(row?.pdfFileUrl, '_blank')
  886. // }else{
  887. // window.$message?.warning('文件不存在')
  888. // }
  889. // }
  890. const tableFileLoading = ref(false)
  891. const tableFileSelection = (rows) => {
  892. console.log(rows)
  893. }
  894. //表格行被点击
  895. const tableFileShow = ref(false)
  896. const tableRowClick = ({row}) => {
  897. tableAllShow.value = true;
  898. tableFileShow.value = true;
  899. tableFileData.value =getArrValue( row['approvalFileList'])
  900. cscTableData1.value=getArrValue( row['approvalFileList'])
  901. InsearchForm.value.total=row['approvalFileList'].length
  902. fileInfo.value=row
  903. // fileInfo.value.pageN=row['approvalFileList'].length||0
  904. fileInfo.value.pageNumber=row['approvalFileList'].length||0
  905. }
  906. const tableFileCloseClick = () => {
  907. tableAllShow.value = false;
  908. tableFileShow.value = false;
  909. }
  910. const viewPdf = async (id) => {
  911. window.$message?.info('预览案卷需要合并pdf,需要一点时间')
  912. pdfLoading.value=true
  913. const {error, code, data, msg} = await tuningApi.printArchive({
  914. id: id
  915. })
  916. pdfLoading.value=false
  917. if (!error && code === 200) {
  918. if (data) {
  919. return data
  920. // window.open(data, '_blank')
  921. } else {
  922. window.$message?.warning('文件不存在')
  923. }
  924. }
  925. // else {
  926. // window.$message?.warning(msg)
  927. // }
  928. }
  929. const consultFileClick =async (row,type) => {
  930. isCarrySpotChecksDrawer.value = true
  931. console.log(row,'row');
  932. // pdfUrl.value=row.approvalFileList
  933. if(type===1){
  934. cscTableData1.value=row.approvalFileList
  935. fileInfo.value=row
  936. // fileInfo.value.pageN=row['approvalFileList'].length||0
  937. fileInfo.value.pageNumber=row['approvalFileList'].length||0
  938. }else if(type==2){
  939. checkId.value=row.id
  940. pdfUrl.value=row.pdfFileUrl
  941. }
  942. if(type===1&& cscTableData1.value.length>0&&cscTableData1.value[0]['pdfFileUrl']){
  943. console.log('查阅案卷');
  944. const url=await viewPdf(row.id)
  945. console.log(url,'url');
  946. pdfUrl.value=url
  947. checkId.value=''
  948. // checkId.value=cscTableData1.value[0].id
  949. // pdfUrl.value=row.approvalFileList[0]['pdfFileUrl']
  950. }
  951. }
  952. const isCarrySpotChecksDrawer = ref(false)
  953. const fileInfo=ref({
  954. name:"",
  955. storageTimeValue:'',
  956. secretLevelValue:'',
  957. filePage:'',
  958. unit:'',
  959. time:'',
  960. pageN:0,
  961. })//案卷信息
  962. const checkId=ref('')
  963. const changePdf=(row)=>{
  964. console.log(row,'row');
  965. pdfUrl.value=row['pdfFileUrl']||''
  966. checkId.value=row.id
  967. }
  968. //类型tab数据和相关处理
  969. const tabTypeKey = ref('tab1')
  970. const tabTypeTab = ref([
  971. {key:'tab1', name: '卷内文件'},
  972. {key:'tab2', name: '竣工资料'},
  973. {key:'tab3', name: '计量资料'},
  974. {key:'tab4', name: '关联资料'},
  975. {key:'tab5', name: '元数据'},
  976. {key:'tab6', name: '验签包'},
  977. ]);
  978. const tabTypeChange = ({key}) => {
  979. tabTypeKey.value = key
  980. }
  981. const cscTableLoading = ref(false)
  982. //卷内目录
  983. const cscTableColumn1 = [
  984. {key:'name', name: '卷内文件题名', align: 'center'}
  985. ];
  986. const cscTableData1 = ref([
  987. ])
  988. //竣工资料
  989. const cscTableColumn2 = [
  990. {key:'name', name: '竣工图资料', align: 'center'}
  991. ];
  992. const cscTableData2 = ref([
  993. ])
  994. //计量资料
  995. const cscTableColumn3 = [
  996. {key:'name', name: '计量资料', align: 'center'}
  997. ];
  998. const cscTableData3 = ref([
  999. // {id: 1, name: 'ZB2-17.pdf'},
  1000. // {id: 2, name: 'ZB2-18.pdf'},
  1001. // {id: 3, name: 'ZB2-19.pdf'},
  1002. // {id: 4, name: 'ZB2-20.pdf'},
  1003. // {id: 5, name: 'ZB2-21.pdf'},
  1004. // {id: 6, name: 'ZB2-22.pdf'},
  1005. // {id: 7, name: 'ZB2-23.pdf'}
  1006. ])
  1007. //计量资料
  1008. const cscTableColumn4 = [
  1009. {key:'name', name: '关联文件', align: 'center'}
  1010. ];
  1011. const cscTableData4 = ref([
  1012. // {id: 1, name: 'xxxxxxxxxxxxxxxxxxx.pdf', tag: '开工'},
  1013. // {id: 2, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '工序'},
  1014. // {id: 3, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '评定'},
  1015. // {id: 4, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '交工'},
  1016. // {id: 5, name: '', tag: '抽检'},
  1017. // {id: 6, name: '', tag: '隐蔽'}
  1018. ])
  1019. //验签包
  1020. const cscTableColumn5 = [
  1021. {key:'user', name: '签名者'},
  1022. {key:'time', name: '签名时间'},
  1023. {key:'val', name: '摘要'},
  1024. ];
  1025. const cscTableColumn51 = [
  1026. {key:'user', name: '签名者', width: 300},
  1027. {key:'time', name: '签名时间', width: 200},
  1028. {key:'val', name: '摘要'},
  1029. ];
  1030. const cscTableData5 = ref([
  1031. ])
  1032. //抽检意见
  1033. const reform = ref({
  1034. type: false, content: ''
  1035. })
  1036. //显示右侧目录
  1037. const isCarryDataShow = ref(true)
  1038. const onCarryDataShow = () => {
  1039. isCarryDataShow.value = !isCarryDataShow.value
  1040. }
  1041. //使用弹窗查看数据
  1042. const cscTableDataModal = ref(false)
  1043. const cscTableDataTitle = ref('')
  1044. //显示弹窗
  1045. const cscTableDataModalShow = () => {
  1046. const key = tabTypeKey.value;
  1047. if (key === 'tab5') {
  1048. cscTableDataTitle.value = '元数据'
  1049. } else if (key === 'tab6') {
  1050. cscTableDataTitle.value = '验签包'
  1051. }
  1052. cscTableDataModal.value = true
  1053. }
  1054. //关闭弹窗
  1055. const cscTableDataModalClose = () => {
  1056. cscTableDataModal.value = false
  1057. }
  1058. //关闭抽查
  1059. const onCarrySpotChecksDrawerClose = () => {
  1060. isCarrySpotChecksDrawer.value = false
  1061. pdfUrl.value=''
  1062. }
  1063. //tab数据和相关处理
  1064. const nodeTabKey = ref('1')
  1065. const nodeTabData = ref([
  1066. {key:'1', name: '业主档案'},
  1067. {key:'2', name: '施工档案'},
  1068. {key:'3', name: '监理档案'},
  1069. {key:'4', name: '文书档案'},
  1070. ]);
  1071. const nodeTabChange = (item) => {
  1072. nodeTabKey.value = item?.key;
  1073. getnodeTabData()
  1074. }
  1075. //获取目录树getArchiveTreeByNodeType
  1076. const checkColId=ref(false)
  1077. const checkNodeid=ref('')
  1078. const singleId=ref('')
  1079. const changeCheckColId=(item)=>{
  1080. let arr= nodeTreeArr.value.filter((ele)=>{
  1081. if(ele.checkColId){
  1082. return ele
  1083. }
  1084. })
  1085. if(arr.length>1){
  1086. nodeTreeArr.value.forEach((ele1)=>{
  1087. if(ele1.id!==item.id)
  1088. ele1.checkColId=false
  1089. })
  1090. }
  1091. if(item.notExsitChild===true){
  1092. singleId.value=item.id
  1093. }else{
  1094. if(!activeName.value){
  1095. checkNodeid.value=item.id
  1096. activeName.value=item.id
  1097. item.checkColId=false
  1098. getNodetreedata()
  1099. }else{
  1100. let idsarr=[]
  1101. if(item.checkColId===false){
  1102. nextTick(()=>{
  1103. nodetreeEl?.value[treeIndex.value].setCheckedKeys([],false);
  1104. })
  1105. }else{
  1106. nextTick(()=>{
  1107. Nodetreedata?.value.forEach((item)=>{
  1108. idsarr.push(item.id)
  1109. })
  1110. nodetreeEl?.value[treeIndex.value].setCheckedKeys(idsarr,true);
  1111. })
  1112. }
  1113. }
  1114. }
  1115. }
  1116. const nodeTreeArrLoad=ref(false)
  1117. const getnodeTabData=async()=>{
  1118. nodeTreeArrLoad.value=true
  1119. const { error, code, data } = await archiveQueryApi.getArchiveTreeByNodeType({
  1120. nodeType:nodeTabKey.value,
  1121. projectId: projectId.value,
  1122. contractId:contractId.value,
  1123. })
  1124. if (!error && code === 200) {
  1125. console.log(data,'mulushu');
  1126. nodeTreeArr.value = getArrValue(data)
  1127. nodeTreeArr.value.forEach((item)=>{
  1128. item.checkColId=false
  1129. })
  1130. nodeTreeArrLoad.value=false
  1131. } else {
  1132. nodeTreeArr.value = []
  1133. nodeTreeArrLoad.value=false
  1134. }
  1135. }
  1136. const defaultProps = {
  1137. children: 'children',
  1138. label: 'nodeName',
  1139. isLeaf: 'notExsitChild'
  1140. }
  1141. const Nodetreedata=ref([])
  1142. const nodetreeEl=ref(null)
  1143. const activeName = ref('')
  1144. const nodeTreeArr = ref([])
  1145. const treeIndex=ref(0)
  1146. const collapseChange = (key) => {
  1147. treeIndex.value=nodeTreeArr.value.findIndex(item=>{return item.id===key})
  1148. checkNodeid.value=key
  1149. activeName.value = key.toString();
  1150. getNodetreedata()
  1151. }
  1152. const nodetreeElloading=ref(false)
  1153. const getNodetreedata=async()=>{
  1154. nodetreeElloading.value=true
  1155. const { error, code, data } = await archiveQueryApi.getChildrenNodeByNodeId({
  1156. nodeId:checkNodeid.value,
  1157. })
  1158. nodetreeElloading.value=false
  1159. if (!error && code === 200) {
  1160. Nodetreedata.value = getArrValue(data)
  1161. } else {
  1162. Nodetreedata.value = []
  1163. }
  1164. }
  1165. const checkNodeids=ref([])
  1166. const loadNode=(tree, resolve)=>{
  1167. archiveQueryApi.getChildrenNodeByNodeId({ nodeId:tree.data.id}).then((response) => {
  1168. let resdata=getArrValue(response.data)
  1169. resolve(resdata);
  1170. })
  1171. }
  1172. //档案柜的tab数据和相关处理
  1173. const tabGuiKey = ref('1')
  1174. const tabGuiData = ref([
  1175. {key:'1', name: '业主档案'},
  1176. {key:'2', name: '施工档案'},
  1177. {key:'3', name: '监理档案'},
  1178. ]);
  1179. const tabGuiChange = (item) => {
  1180. tabGuiKey.value = item?.key;
  1181. searchForm.value.current = 1
  1182. searchForm.value.archiveType = tabGuiKey.value
  1183. getTableData()
  1184. }
  1185. //测试档案柜的数据
  1186. const guiItemData = ref([
  1187. {
  1188. children: [
  1189. {id: '柜子id或其他的唯一值', name: '01', content: '档号xxxx ~ 档号xxxxx'},
  1190. {id: '柜子id或其他的唯一值', name: '02', content: '档号xxxx ~ 档号xxxxx'},
  1191. {id: '柜子id或其他的唯一值', name: '03', content: '档号xxxx ~ 档号xxxxx'},
  1192. {id: '柜子id或其他的唯一值', name: '04', content: '档号xxxx ~ 档号xxxxx'},
  1193. ]
  1194. },
  1195. {
  1196. children: [
  1197. {id: '柜子id或其他的唯一值', name: '05', content: '档号xxxx ~ 档号xxxxx'},
  1198. {id: '柜子id或其他的唯一值', name: '06', content: '档号xxxx ~ 档号xxxxx'},
  1199. {id: '柜子id或其他的唯一值', name: '07', content: '档号xxxx ~ 档号xxxxx'},
  1200. {id: '柜子id或其他的唯一值', name: '08', content: '档号xxxx ~ 档号xxxxx'},
  1201. ]
  1202. },
  1203. {
  1204. children: [
  1205. {id: '柜子id或其他的唯一值', name: '09', content: '档号xxxx ~ 档号xxxxx'},
  1206. {id: '柜子id或其他的唯一值', name: '10', content: '档号xxxx ~ 档号xxxxx'},
  1207. ]
  1208. }
  1209. ])
  1210. //柜子被点击
  1211. const isGuiInfoDrawer = ref(false)
  1212. const guiItemClick = (item) => {
  1213. console.log(item)
  1214. isGuiInfoDrawer.value = true
  1215. }
  1216. //关闭抽屉
  1217. const onCloseGuiInfoDrawer = () => {
  1218. isGuiInfoDrawer.value = false
  1219. }
  1220. //案卷文件数据
  1221. const guiInfoCurKey = ref('')
  1222. const guiInfoData = ref([
  1223. {
  1224. children: [
  1225. {id: '1', name: '123Abc'},
  1226. {id: '2', name: '12测试一下Ab'},
  1227. {id: '3', name: 'ABCDEFG'},
  1228. {id: '4', name: '123456789'},
  1229. {id: '5', name: '123456789'},
  1230. {id: '6', name: '123456789'},
  1231. {id: '7', name: '123456789'},
  1232. {id: '8', name: '123456789'},
  1233. ]
  1234. },
  1235. {
  1236. children: [
  1237. {id: '1', name: '123456789'},
  1238. {id: '2', name: '123456789'},
  1239. {id: '3', name: '123456789'},
  1240. {id: '4', name: '123456789'},
  1241. {id: '5', name: '123456789'},
  1242. {id: '6', name: '123456789'},
  1243. {id: '7', name: '123456789'},
  1244. {id: '8', name: '123456789'},
  1245. ]
  1246. },
  1247. {
  1248. children: [
  1249. {id: '1', name: '123456789'},
  1250. {id: '2', name: '123456789'},
  1251. {id: '3', name: '123456789'},
  1252. {id: '4', name: '123456789'},
  1253. {id: '5', name: '123456789'},
  1254. {id: '6', name: '123456789'},
  1255. {id: '7', name: '123456789'},
  1256. {id: '8', name: '123456789'},
  1257. ]
  1258. },
  1259. {
  1260. children: [
  1261. {id: '1', name: '123456789'},
  1262. {id: '2', name: '123456789'},
  1263. {id: '3', name: '123456789'},
  1264. {id: '4', name: '123456789'},
  1265. {id: '5', name: '123456789'},
  1266. {id: '6', name: '123456789'},
  1267. {id: '7', name: '123456789'},
  1268. {id: '8', name: '123456789'},
  1269. ]
  1270. },
  1271. {
  1272. children: [
  1273. {id: '1', name: '123456789'},
  1274. {id: '2', name: '123456789'},
  1275. {id: '3', name: '123456789'},
  1276. {id: '4', name: '123456789'},
  1277. {id: '5', name: '123456789'},
  1278. {id: '6', name: '123456789'},
  1279. {id: '7', name: '123456789'},
  1280. {id: '8', name: '123456789'},
  1281. ]
  1282. },
  1283. {
  1284. children: [
  1285. {id: '1', name: '123456789'},
  1286. {id: '2', name: '123456789'},
  1287. {id: '3', name: '123456789'},
  1288. {id: '4', name: '123456789'},
  1289. {id: '5', name: '123456789'},
  1290. {id: '6', name: '123456789'},
  1291. {id: '7', name: '123456789'},
  1292. {id: '8', name: '123456789'},
  1293. ]
  1294. },
  1295. {
  1296. children: [
  1297. {id: '1', name: '123456789'},
  1298. {id: '2', name: '123456789'},
  1299. {id: '3', name: '123456789'},
  1300. {id: '4', name: '123456789'},
  1301. {id: '5', name: '123456789'},
  1302. {id: '6', name: '123456789'},
  1303. {id: '7', name: '123456789'},
  1304. {id: '8', name: '123456789'},
  1305. ]
  1306. },
  1307. {
  1308. children: [
  1309. {id: '1', name: '123456789'},
  1310. {id: '2', name: '123456789'},
  1311. {id: '3', name: '123456789'},
  1312. {id: '4', name: '123456789'},
  1313. {id: '5', name: '123456789'},
  1314. {id: '6', name: '123456789'},
  1315. {id: '7', name: '123456789'},
  1316. {id: '8', name: '123456789'},
  1317. ]
  1318. },
  1319. {
  1320. children: [
  1321. {id: '1', name: '123456789'},
  1322. {id: '2', name: '123456789'},
  1323. {id: '3', name: '123456789'},
  1324. {id: '4', name: '123456789'},
  1325. {id: '5', name: '123456789'},
  1326. {id: '6', name: '123456789'},
  1327. {id: '7', name: '123456789'},
  1328. {id: '8', name: '123456789'},
  1329. ]
  1330. },
  1331. {
  1332. children: [
  1333. {id: '1', name: '123456789'},
  1334. {id: '2', name: '123456789'},
  1335. {id: '3', name: '123456789'},
  1336. {id: '4', name: '123456789'},
  1337. {id: '5', name: '123456789'},
  1338. {id: '6', name: '123456789'},
  1339. {id: '7', name: '123456789'},
  1340. {id: '8', name: '123456789'},
  1341. ]
  1342. },
  1343. {
  1344. children: [
  1345. {id: '1', name: '123456789'},
  1346. {id: '2', name: '123456789'},
  1347. {id: '3', name: '123456789'},
  1348. {id: '4', name: '123456789'},
  1349. {id: '5', name: '123456789'},
  1350. {id: '6', name: '123456789'},
  1351. {id: '7', name: '123456789'},
  1352. {id: '8', name: '123456789'},
  1353. ]
  1354. },
  1355. {
  1356. children: [
  1357. {id: '1', name: '123456789'},
  1358. {id: '2', name: '123456789'},
  1359. {id: '3', name: '123456789'},
  1360. {id: '4', name: '123456789'},
  1361. {id: '5', name: '123456789'},
  1362. {id: '6', name: '123456789'},
  1363. {id: '7', name: '123456789'},
  1364. {id: '8', name: '123456789'},
  1365. ]
  1366. },
  1367. {
  1368. children: [
  1369. {id: '1', name: '123456789'},
  1370. {id: '2', name: '123456789'},
  1371. {id: '3', name: '123456789'},
  1372. {id: '4', name: '123456789'},
  1373. {id: '5', name: '123456789'},
  1374. {id: '6', name: '123456789'},
  1375. {id: '7', name: '123456789'},
  1376. {id: '8', name: '123456789'},
  1377. ]
  1378. },
  1379. {
  1380. children: [
  1381. {id: '1', name: '123456789'},
  1382. {id: '2', name: '123456789'},
  1383. {id: '3', name: '123456789'},
  1384. {id: '4', name: '123456789'},
  1385. {id: '5', name: '123456789'},
  1386. {id: '6', name: '123456789'},
  1387. {id: '7', name: '123456789'},
  1388. {id: '8', name: '123456789'},
  1389. ]
  1390. },
  1391. {
  1392. children: [
  1393. {id: '1', name: '123456789'},
  1394. {id: '2', name: '123456789'},
  1395. {id: '3', name: '123456789'},
  1396. {id: '4', name: '123456789'},
  1397. {id: '5', name: '123456789'},
  1398. {id: '6', name: '123456789'},
  1399. {id: '7', name: '123456789'},
  1400. {id: '8', name: '123456789'},
  1401. ]
  1402. },
  1403. ])
  1404. //点击档案
  1405. const guiFileInfo = (item) => {
  1406. //因为当前测试数据的id是有重复的,所以,点击后,会出现多个选中。
  1407. guiInfoCurKey.value = item.id
  1408. }
  1409. </script>
  1410. <style lang="scss" scoped>
  1411. @import '~style/using/scoped/query.scss';
  1412. </style>
  1413. <style lang="scss">
  1414. @import '~style/using/query.scss';
  1415. .col_tree{
  1416. font-size: 16px;
  1417. }
  1418. .hc-tag-box {
  1419. position: relative;
  1420. width: calc(100% - 40px);
  1421. overflow: hidden;
  1422. }
  1423. .scrollbar-content {
  1424. white-space: nowrap;
  1425. padding: 10px;
  1426. }
  1427. .flex_box{
  1428. display: flex;
  1429. justify-content: center;
  1430. align-items: center;
  1431. }
  1432. </style>