query.vue 52 KB

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