1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645 |
- <template>
- <div id="carry-spot-checks-layout-target" class="hc-using-query-page">
- <div v-show="!isCarrySpotChecksDrawer" class="hc-query-card-box">
- <div v-if="isShowheader" class="hc-tag-flex-box">
- <div class="hc-arrow-icon">
- <HcIcon name="arrow-left-s" />
- </div>
- <div class="hc-tag-box">
- <el-scrollbar>
- <div class="scrollbar-content">
- <template v-for="(item, index) in tags" :key="index">
- <el-tag class="mx-1" closable effect="light" size="large" @close="deltag(item)">
- {{ item.name }}
- </el-tag>
- </template>
- </div>
- </el-scrollbar>
- </div>
- <div class="hc-arrow-icon">
- <HcIcon name="arrow-right-s" />
- </div>
- </div>
- <div class="hc-query-input-box">
- <el-input
- v-model="searchInput" clearable placeholder="可按关键字模糊搜索,多个关键字用“,” 隔开"
- @clear="clearinput"
- >
- <template #prepend>
- <div class="prepend-filtering" @click="filteringClick">
- <span class="name">条件筛选</span>
- <HcIcon v-if="filteringShow === 'show'" name="arrow-up-double" />
- <HcIcon v-else name="arrow-down-double" />
- </div>
- </template>
- <template #append>
- <div class="append-search-btn-box">
- <el-button class="search-btn" type="primary" @click="searchCaseClick('1')">
- 按案卷查询
- </el-button>
- <el-button class="search-btn" type="primary" @click="searchFileClick('2')">
- 按文件查询
- </el-button>
- </div>
- </template>
- </el-input>
- <HcMediaMic :loading="tableLoading" class="hc-query-mic" @change="mediaMicChange" />
- </div>
- <div class="hc-query-filtering-collapse-box">
- <div class="filtering-collapse">
- <el-collapse v-model="filteringShow" accordion @change="filteringChange">
- <el-collapse-item name="show">
- <div class="hc-search-hot-key">
- <span>热门搜索词汇:</span>
- <span
- v-for="item in hotInputlist" :key="item.name" class="ml-4"
- @click="clickHottitle(item)"
- >{{ item.name }}</span>
- </div>
- <div class="hc-search-screening-item">
- <div class="title">类别:</div>
- <template v-for="(item, index) in classess" :key="index">
- <div
- :class="isArrIndex(classes, 'key', item.key) ? 'cut' : ''"
- class="screening-key"
- @click="classesClick(item)"
- >
- {{ item.name }}
- </div>
- </template>
- </div>
- <div class="hc-search-screening-item">
- <div class="title">目录:</div>
- <el-button type="primary" @click="nodeTreeClick">
- <HcIcon :line="false" name="node-tree" />
- <span>目录树</span>
- </el-button>
- </div>
- <div class="hc-search-screening-item">
- <div class="title">年度:</div>
- <template v-for="(item, index) in annuals" :key="index">
- <div
- :class="isArrIndex(annual, 'key', item.key) ? 'cut' : ''" class="screening-key"
- @click="annualClick(item)"
- >
- {{ item.name }}
- </div>
- </template>
- </div>
- <div class="hc-search-screening-item">
- <div class="title">月份:</div>
- <template v-for="(item, index) in months" :key="index">
- <div
- :class="isArrIndex(month, 'key', item.key) ? 'cut' : ''" class="screening-key"
- @click="monthClick(item)"
- >
- {{ item.name }}
- </div>
- </template>
- </div>
- <div class="hc-search-screening-item">
- <div class="title">期限:</div>
- <template v-for="(item, index) in deadlines" :key="index">
- <div
- :class="isArrIndex(deadline, 'key', item.key) ? 'cut' : ''"
- class="screening-key"
- @click="deadlineClick(item)"
- >
- {{ item.name }}
- </div>
- </template>
- </div>
- <div class="hc-search-screening-item mb-4">
- <div class="title">密级:</div>
- <template v-for="(item, index) in securitys" :key="index">
- <div
- :class="isArrIndex(security, 'key', item.key) ? 'cut' : ''"
- class="screening-key"
- @click="securityClick(item)"
- >
- {{ item.name }}
- </div>
- </template>
- </div>
- </el-collapse-item>
- </el-collapse>
- </div>
- </div>
- <div class="hc-gather-card-box">
- <hc-body padding="0px">
- <hc-tab-card :tab-key="tabKey" :tabs="tabData" @change="tabChange">
- <template #extra>
- <el-button v-if="tabKey === 'tab1'" :loading="batchLoading" @click="batchClick">
- 下载
- </el-button>
- <HcNewSwitch
- v-if="tabKey === 'tab2'" :datas="tabGuiData" :keys="tabGuiKey" size="default"
- @change="tabGuiChange"
- />
- </template>
- <div
- v-if="tabKey === 'tab1'" :class="tableAllShow ? 'file-table' : ''"
- class="hc-gather-card-table"
- >
- <div class="hc-card-item-main">
- <hc-card-item>
- <hc-table
- ref="tableRef" :check-style="{ width: 29 }" :column="tableColumn" :datas="tableData"
- :index-style="{ width: 60 }" :loading="tableLoading" is-check is-current-row
- is-new
- @row-click="tableRowClick" @selection-change="tableSelection"
- >
- <template #action="{ row }">
- <el-link
- v-if="AppTheme === 'light'" class="mylink" type="primary"
- @click.stop="consultFileClick(row, 1)"
- >
- 查阅案卷
- </el-link>
- <el-button
- v-else size="small" type="primary"
- @click.stop="consultFileClick(row, 1)"
- >
- 查阅案卷
- </el-button>
- </template>
- </hc-table>
- <template #action>
- <hc-pages :pages="searchForm" @change="pageChange" />
- </template>
- </hc-card-item>
- </div>
- <div class="hc-card-item-file">
- <hc-card-item title="卷内文件">
- <template #extra>
- <div class="hc-icon-close text-hover" @click="tableFileCloseClick">
- <HcIcon name="close" />
- </div>
- </template>
- <hc-table
- ref="tableFileRef" :check-style="{ width: 29 }" :column="tableFileColumn"
- :datas="tableFileData"
- :index-style="{ width: 60 }" :loading="tableFileLoading" is-check is-new
- @selection-change="tableFileSelection"
- >
- <template #action="{ row }">
- <el-link type="primary" @click.stop="consultFileClick(row, 2)">
- 查阅文件
- </el-link>
- </template>
- </hc-table>
- </hc-card-item>
- </div>
- </div>
- <div v-if="tabKey === 'tab2'" :class="isMac ? 'is-mac' : ''" class="hc-gather-card-table gui">
- <div v-loading="tableLoading" class="hc-card-item-main">
- <el-carousel
- v-if="guiItemData.length > 0" :autoplay="false" :loop="false"
- class="hc-file-cabinet" indicator-position="none"
- >
- <el-carousel-item v-for="(item, index) in guiItemData" :key="index">
- <div :class="isVideoShow ? 'hidden' : ''" class="hc-file-cabinet-gui">
- <div
- v-for="(items, indexs) in item.children" :key="indexs"
- class="gui-item"
- >
- <el-popover
- :content="items.content" :hide-after="0" :offset="-10"
- :title="`${items.name}柜`"
- :width="200" effect="dark" placement="top"
- >
- <template #reference>
- <div class="gui-view" @click="guiItemClick(items)">
- <img :src="imageViewGui" alt="">
- <span class="num">{{ items.name }}</span>
- </div>
- </template>
- </el-popover>
- </div>
- </div>
- </el-carousel-item>
- </el-carousel>
- <hc-empty v-else />
- <div :class="[isVideoShow ? 'animate__zoomIn' : '']" class="hc-gui-video">
- <video ref="videoRef" muted>
- <source src="/gui.mp4" type="video/mp4">
- </video>
- </div>
- </div>
- </div>
- </hc-tab-card>
- </hc-body>
- </div>
- </div>
- <!-- 预加载视频 -->
- <video class="hc-preloaded-video" muted autoplay>
- <source src="/gui.mp4" type="video/mp4">
- </video>
- <!-- 柜子侧面 -->
- <HcDrawer
- v-model="isGuiInfoDrawer" direction="rtl" to-id="carry-spot-checks-layout-target"
- ui="hc-carry-spot-checks-target" @close="onCloseGuiInfoDrawer"
- >
- <template #header>
- <div class="w-96">
- <el-input v-model="searchForm.innerSearch" clearable placeholder="请输入关键词检索" size="large" />
- </div>
- <div class="ml-2">
- <el-button size="large" type="primary" @click="guiInfoSearch">
- <HcIcon name="search-2" />
- <span>搜索</span>
- </el-button>
- </div>
- </template>
- <div v-loading="guiInfoLoading" class="hc-gui-info-drawer">
- <div class="hc-gui-info-img">
- <div class="gui-info-img">
- <img :src="imageViewGui1" alt="">
- <div class="gui-file-item-box">
- <div v-for="(item, index) in guiInfoData" :key="index" class="gui-file-item">
- <template v-for="(items, indexs) in item.children" :key="indexs">
- <!-- query 为搜索后的结果进行选中,cur 为点击的选中 -->
- <div
- :class="[items.isSelect === 1 ? 'query' : '', guiInfoCurKey.id === items.id ? 'cur' : '']"
- class="item"
- @click="guiFileInfo(items)"
- >
- {{ items.sideNumber }}
- </div>
- </template>
- </div>
- </div>
- </div>
- </div>
- <div class="hc-gui-info-data">
- <div class="hc-gui-data-container">
- <img :src="imageViewGui2" alt="">
- <div class="hc-gui-info-item-box">
- <div class="hc-gui-info-item">
- <div class="info-item" style="top: 10px">
- <div class="title">
- <span>档</span>
- <span>号:</span>
- </div>
- <div class="text">{{ guiInfoCurKey.fileNumber }}</div>
- </div>
- <div class="info-item-name">{{ guiInfoCurKey.name }}</div>
- <div class="hc-info-item-bottom">
- <div class="info-item">
- <div class="title">立卷单位:</div>
- <div class="text">{{ guiInfoCurKey.unit }}</div>
- </div>
- <div class="info-item">
- <div class="title">起止日期:</div>
- <div
- v-if="guiInfoCurKey?.endDate !== null || guiInfoCurKey?.startDate !== null"
- class="text"
- >
- <div>{{ setTimeString(splitDate(guiInfoCurKey?.startDate)) }}~{{ setTimeString(splitDate(guiInfoCurKey?.endDate)) }}</div>
- </div>
- <div v-else class="text" />
- </div>
- <div class="info-item">
- <div class="title">保管期限:</div>
- <div class="text">{{ guiInfoCurKey.storageTimeValue }}</div>
- </div>
- <div class="info-item">
- <div class="title">
- <span>密</span>
- <span>级:</span>
- </div>
- <div class="text">{{ guiInfoCurKey.secretLevelValue }}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="btn-box">
- <el-button
- :disabled="guiInfoData.length <= 0" size="large" type="primary"
- @click="consultFileClick(guiInfoCurKey, 1)"
- >
- 打开案卷
- </el-button>
- <el-button size="large" @click="onCloseGuiInfoDrawer">
- <HcIcon name="close" />
- <span>关闭</span>
- </el-button>
- </div>
- </div>
- </div>
- </HcDrawer>
- <!-- 展开抽查 -->
- <HcDrawer
- v-model="isCarrySpotChecksDrawer" to-id="carry-spot-checks-layout-target"
- ui="hc-carry-spot-checks-target" @close="onCarrySpotChecksDrawerClose"
- >
- <div class="hc-carry-spot-checks-pdf">
- <!-- <HcPdf src="https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221212/ce9799c7d18efc03efefd6f242439f2e.pdf"/> -->
- <div v-loading="pdfLoading" class="relative h-full w-full">
- <hc-pdfs :url="pdfUrl" />
- </div>
- <el-tooltip :disabled="!isBubble" content="展开/收起 右侧目录" placement="top">
- <div class="hc-csc-pdf-btn" @click="onCarryDataShow">
- <HcIcon v-show="isCarryDataShow" name="arrow-right-s" />
- <HcIcon v-show="!isCarryDataShow" name="arrow-left-s" />
- </div>
- </el-tooltip>
- </div>
- <div v-show="isCarryDataShow" class="hc-carry-spot-checks-data">
- <div class="hc-csc-switch">
- <HcNewSwitch
- :datas="tabTypeTab" :keys="tabTypeKey" :round="false" size="default"
- @change="tabTypeChange"
- />
- </div>
- <div class="hc-csc-info-box">
- <el-scrollbar>
- <div class="hc-info-text-item">
- <div class="title">案卷题名:</div>
- <div class="content">{{ fileInfo.name }}</div>
- </div>
- <!-- <div class="hc-info-text-item">
- <div class="title">
- <span>密</span>
- <span class="ml-7">级:</span>
- </div>
- <div class="content">{{ fileInfo.secretLevelValue }}</div>
- </div> -->
- <div class="hc-info-text-item">
- <div class="title">保管期限:</div>
- <div class="content">{{ fileInfo.storageTimeValue }}</div>
- </div>
- <!-- <div class="hc-info-text-item">
- <div class="title">卷内文件:</div>
- <div class="content">{{ fileInfo.pageNumber }}</div>
- </div> -->
- <div class="hc-info-text-item">
- <div class="title">起止日期:</div>
- <div v-if="fileInfo?.endDate !== '' || fileInfo?.startDate !== ''" class="content">
- {{ `${splitDate(fileInfo?.startDate)}~${splitDate(fileInfo?.endDate)}` }}
- </div>
- <div v-else class="content" />
- </div>
- <div class="hc-info-text-item">
- <div class="title">立卷单位:</div>
- <div class="content">{{ fileInfo.unit }}</div>
- </div>
- </el-scrollbar>
- </div>
- <div class="hc-csc-data-box-height">
- <HcTable
- v-if="tabTypeKey === 'tab1'" :column="cscTableColumn1" :datas="cscTableData1"
- :is-arr-index="false" :loading="cscTableLoading" is-new
- >
- <template #name="{ row }">
- <div :class="row.id === checkId ? 'bg-orange-400' : 'text-hover'" @click="changePdf(row)">
- {{ row?.fileName }}
- </div>
- </template>
- </HcTable>
- <HcTable
- v-if="tabTypeKey === 'tab2'" :column="cscTableColumn2" :datas="cscTableData2"
- :is-arr-index="false" :loading="cscTableLoading" is-new
- >
- <template #name="{ row }">
- <div :class="row.id === 2 ? 'text-link' : 'text-hover'">{{ row?.name }}</div>
- </template>
- </HcTable>
- <HcTable
- v-if="tabTypeKey === 'tab3'" :column="cscTableColumn3" :datas="cscTableData3"
- :is-arr-index="false" :loading="cscTableLoading" is-new
- >
- <template #name="{ row }">
- <div :class="row.id === 2 ? 'text-link' : 'text-hover'">{{ row?.name }}</div>
- </template>
- </HcTable>
- <HcTable
- v-if="tabTypeKey === 'tab4'" :column="cscTableColumn4" :datas="cscTableData4"
- :is-arr-index="false" :loading="cscTableLoading" is-new
- >
- <template #name="{ row }">
- <div :class="row.id === 2 ? 'text-link' : 'text-hover'" class="hc-csc-associated-row">
- <el-tag effect="dark">{{ row?.tag }}</el-tag>
- <span class="ml-3">{{ row?.name }}</span>
- </div>
- </template>
- </HcTable>
- <MetaTable
- v-if="tabTypeKey === 'tab5'" :ishow-file="isFile === 1 ? false : true"
- :loading="cscTableLoading" :meta-data-table="cscmetaDataTabledata"
- />
- <HcTable
- v-if="tabTypeKey === 'tab6'" :column="cscTableColumn5" :datas="cscTableData5"
- :index-style="{ width: 60 }" :loading="cscTableLoading" is-new
- />
- <el-tooltip
- v-if="tabTypeKey === 'tab6' || tabTypeKey === 'tab5'" :disabled="!isBubble"
- content="使用弹窗查看数据" placement="top"
- >
- <div class="hc-table-info-btn" @click="cscTableDataModalShow">
- <HcIcon name="airplay" />
- </div>
- </el-tooltip>
- </div>
- <div class="hc-csc-action-box-height">
- <div class="btn-box">
- <el-button hc-btn size="large" style="height: 40px; padding: 0 15px;" type="warning" @click="onCarrySpotChecksDrawerClose">
- <HcIcon name="close" />
- <span>取消查阅</span>
- </el-button>
- </div>
- </div>
- </div>
- </HcDrawer>
- <!-- 使用弹窗查看数据 -->
- <hc-new-dialog
- v-model="cscTableDataModal" :footer="false" :title="cscTableDataTitle" is-table widths="1080px"
- @close="cscTableDataModalClose"
- >
- <MetaTable
- v-if="tabTypeKey === 'tab5'" :ishow-file="isFile === 1 ? false : true" :loading="cscTableLoading"
- :meta-data-table="cscmetaDataTabledata"
- />
- <HcTable
- v-if="tabTypeKey === 'tab6'" :column="cscTableColumn51" :datas="cscTableData5"
- :index-style="{ width: 60 }" :loading="cscTableLoading" is-new
- />
- </hc-new-dialog>
- <!-- 目录树 -->
- <hc-new-dialog
- v-model="nodeTreeModal" :is-close="false" is-table save-text="确认" widths="1080px"
- @close="nodeTreeModalClose" @save="nodeTreeModalSave"
- >
- <template #header>
- <div class="el-dialog__title" role="heading">
- <span class="mr-3">选择目录</span>
- <span class="text-sm text-orange">点击左侧黄色文件夹可展开下一级</span>
- </div>
- </template>
- <template #extra>
- <HcNewSwitch :datas="nodeTabData" :keys="nodeTabKey" :round="false" @change="nodeTabChange" />
- </template>
- <el-collapse
- v-model="activeName" v-loading="nodeTreeArrLoad" class="hc-node-tree-collapse"
- @change="collapseChange"
- >
- <template v-for="(item, index) in nodeTreeArr" :key="index">
- <el-collapse-item :disabled="item.notExsitChild === true" :name="item.id.toString()">
- <template #title>
- <div class="hc-collapse-item-title">
- <el-checkbox
- v-model="item.checkColId" style="font-size: 24px;"
- @change="changeCheckColId(item, index)" @click.stop.native="() => {}"
- />
- <HcIcon v-if="item.notExsitChild === true" class="icon" fill name="file" />
- <HcIcon v-else class="icon" fill name="folder-3" />
- <span class="title">{{ item.nodeName }}</span>
- </div>
- </template>
- <el-tree
- ref="nodetreeEl" v-loading="nodetreeElloading" :data="item.Nodetreedata" :load="loadNode"
- :props="defaultProps" class="col_tree" lazy node-key="id" show-checkbox
- >
- <template #default="{ node, data }">
- <span class="custom-tree-node">
- <HcIcon
- v-if="data.notExsitChild === true" class="icon" fill name="file"
- style="color: #FFAF2D;"
- />
- <HcIcon v-else class="icon" fill name="folder-3" style="color: #FFAF2D;" />
- <span>{{ node.label }}</span>
- </span>
- </template>
- </el-tree>
- </el-collapse-item>
- </template>
- </el-collapse>
- <hc-empty v-if="nodeTreeArr.length === 0" />
- </hc-new-dialog>
- </div>
- </template>
- <script setup>
- import { onMounted, ref, watch } from 'vue'
- import { useAppStore } from '~src/store'
- import { arrIndex, arrToId, downloadBlob, getArrValue, getObjValue, isArrIndex, isNullES } from 'js-fast-way'
- import MetaTable from '../transfer/components/meta-table.vue'
- import HcMediaMic from './components/media-mic/index.vue'
- import archiveQueryApi from '~api/using/query.js'
- import tuningApi from '~api/archiveConfig/tuning.js'
- import imageViewGui from '~src/assets/view/gui.png'
- import imageViewGui1 from '~src/assets/view/gui1.png'
- import imageViewGui2 from '~src/assets/view/gui2.png'
- import { setTimeString } from '~src/utils/tools'
- //变量
- const useAppState = useAppStore()
- const projectId = ref(useAppState.getProjectId)
- const contractId = ref(useAppState.getContractId)
- const contractInfo = ref(useAppState.getContractInfo)
- const isBubble = ref(useAppState.getBubble)
- const isShowheader = ref(false)
- const tags = ref([])
- const userAgent = navigator.userAgent
- const isMac = userAgent.indexOf('Mac') !== -1
- const AppTheme = ref(useAppState.getTheme)
- //监听
- watch(() => [useAppState.getBubble, tags.value, useAppState.getTheme], ([bubble, Tags, theme]) => {
- isBubble.value = bubble
- AppTheme.value = theme
- isShowheader.value = Tags.length !== 0
- })
- //渲染完成
- onMounted(() => {
- getCarrierTypeByDictdata()
- setAnnuals()
- setMonths()
- getTableData()
- })
- //截取日期
- const splitDate = (val) => {
- if (val) {
- return val?.substring(0, 10)
- } else {
- return ''
- }
- }
- //处理数据
- const rowsToArr = (rows) => {
- let newArr = []
- for (let i = 0; i < rows.length; i++) {
- newArr.push(rows[i]?.key)
- }
- return newArr.join(',')
- }
- const deltag = (item) => {
- tags.value = tags.value.filter((ele) => {
- if (item.name !== ele.name) {
- return item
- }
- })
- //设置年份
- annual.value = annual.value.filter((ele) => {
- if (item.name !== ele.name) {
- return item
- }
- })
- yeararr.value = yeararr.value.filter((ele) => {
- if (item.name !== ele.name) {
- return item
- }
- })
- searchForm.value.year = rowsToArr(annual.value)
- if (annual.value.length === 0) {
- annual.value = [{ key: 'all', name: '所有' }]
- }
- //设置月份
- month.value = month.value.filter((ele) => {
- if (item.name !== ele.name) {
- return item
- }
- })
- montharr.value = montharr.value.filter((ele) => {
- if (item.name !== ele.name) {
- return item
- }
- })
- searchForm.value.month = rowsToArr(month.value)
- if (month.value.length == 0) {
- month.value = [{ key: 'all', name: '所有' }]
- }
- //设置保管期限
- deadline.value = deadline.value.filter((ele) => {
- if (item.name !== ele.name) {
- return item
- }
- })
- deadlinearr.value = deadlinearr.value.filter((ele) => {
- if (item.name !== ele.name) {
- return item
- }
- })
- searchForm.value.storageTime = rowsToArr(deadline.value)
- if (deadline.value.length == 0) {
- deadline.value = [{ key: 'all', name: '所有' }]
- }
- //设置密级
- security.value = security.value.filter((ele) => {
- if (item.name !== ele.name) {
- return item
- }
- })
- securityarr.value = securityarr.value.filter((ele) => {
- if (item.name !== ele.name) {
- return item
- }
- })
- searchForm.value.secretLevel = rowsToArr(security.value)
- if (security.value.length == 0) {
- security.value = [{ key: 'all', name: '所有' }]
- }
- //设置类别
- classes.value = classes.value.filter((ele) => {
- if (item.name !== ele.name) {
- return item
- }
- })
- classesarr.value = classesarr.value.filter((ele) => {
- if (item.name !== ele.name) {
- return item
- }
- })
- searchForm.value.carrierType = rowsToArr(classes.value)
- if (classes.value.length == 0) {
- classes.value = [{ key: 'all', name: '所有' }]
- }
- }
- //搜索表单
- const searchForm = ref({
- current: 1, size: 20, total: 0, searchType: '1', listType: 1, archiveType: '', cabinetNumber: '', innerSearch: '',
- })
- //卷内文件
- const InsearchForm = ref({
- current: 1, size: 20, total: 0,
- })
- //热门搜索词汇
- const hotInputlist = ref([
- { name: '文件名' },
- { name: '案卷名' },
- { name: '档号' },
- { name: '单位' },
- ])
- const clickHottitle = (item) => {
- searchInput.value = item.name
- searchForm.value.queryValue = item.name
- }
- const clearinput = () => {
- searchForm.value.searchType = '1'
- getTableData()
- }
- //年度
- const annuals = ref([])
- const setAnnuals = () => {
- let annualArr = [{ key: 'all', name: '所有' }]
- const year = new Date().getFullYear()
- for (let i = 0; i < 8; i++) {
- const item = year - i + ''
- annualArr.push({
- key: item,
- name: item + '年',
- })
- }
- annuals.value = annualArr
- }
- //数组去重
- const some = (arr) => {
- let some = []
- arr.forEach(el => {
- if (!some.some(e => e.name == el.name)) {
- some.push(el)
- }
- })
- return some
- }
- const allarr = ref([])
- const montharr = ref([])
- const yeararr = ref([])
- const deadlinearr = ref([])
- const securityarr = ref([])
- const classesarr = ref([])
- const setTags = (val, type) => {
- let arr = []
- val.forEach((item) => {
- if (item.name !== '所有') {
- arr.push({ name: item.name })
- }
- })
- let filarr = some(arr)
- if (type === 'month') {
- montharr.value = some(filarr)
- if (montharr.value.length == 0) {
- month.value = [{ key: 'all', name: '所有' }]
- }
- } else if (type === 'year') {
- yeararr.value = some(filarr)
- if (yeararr.value.length == 0) {
- annual.value = [{ key: 'all', name: '所有' }]
- }
- } else if (type === 'deadline') {
- deadlinearr.value = some(filarr)
- if (deadlinearr.value.length == 0) {
- deadline.value = [{ key: 'all', name: '所有' }]
- }
- } else if (type === 'security') {
- securityarr.value = some(filarr)
- if (securityarr.value.length == 0) {
- security.value = [{ key: 'all', name: '所有' }]
- }
- } else if (type === 'classes') {
- classesarr.value = some(filarr)
- if (classesarr.value.length == 0) {
- classes.value = [{ key: 'all', name: '所有' }]
- }
- }
- let finalarr = []
- yeararr.value.forEach((item) => {
- finalarr.push({ name: item.name })
- })
- montharr.value.forEach((item) => {
- finalarr.push({ name: item.name })
- })
- deadlinearr.value.forEach((item) => {
- finalarr.push({ name: item.name })
- })
- securityarr.value.forEach((item) => {
- finalarr.push({ name: item.name })
- })
- classesarr.value.forEach((item) => {
- finalarr.push({ name: item.name })
- })
- tags.value = some(finalarr)
- }
- const annual = ref([{ key: 'all', name: '所有' }])
- const annualClick = (item) => {
- annual.value = setQueryFiltering(annual.value, item)
- setTags(annual.value, 'year')
- searchForm.value.year = item.name
- let arr = []
- annual.value.forEach((item) => {
- arr.push(item.key)
- })
- searchForm.value.year = arr + ''
- }
- //月份
- const months = ref([])
- const setMonths = () => {
- let monthArr = [{ key: 'all', name: '所有' }]
- for (let i = 0; i < 12; i++) {
- let item = (i + 1) + ''
- item.length === 1 && (item = item)
- monthArr.push({
- key: item,
- name: item + '月',
- })
- }
- months.value = monthArr
- }
- const month = ref([{ key: 'all', name: '所有' }])
- const monthClick = (item) => {
- month.value = setQueryFiltering(month.value, item)
- setTags(month.value, 'month')
- let arr = []
- month.value.forEach((item) => {
- arr.push(item.key)
- })
- searchForm.value.month = arr + ''
- }
- //期限
- const deadline = ref([{ key: 'all', name: '所有' }])
- const deadlines = ref([
- { key: 'all', name: '所有' },
- { key: '3', name: '永久' },
- { key: '2', name: '30年' },
- { key: '1', name: '10年' },
- ])
- const deadlineClick = (item) => {
- deadline.value = setQueryFiltering(deadline.value, item)
- setTags(deadline.value, 'deadline')
- let arr = []
- deadline.value.forEach((item) => {
- arr.push(item.key)
- })
- searchForm.value.storageTime = arr + ''
- }
- //密级
- const security = ref([{ key: 'all', name: '所有' }])
- const securitys = ref([
- { key: 'all', name: '所有' },
- { key: '1', name: '机密' },
- { key: '2', name: '绝密' },
- { key: '3', name: '秘密' },
- { key: '4', name: '公开' },
- ])
- const securityClick = (item) => {
- security.value = setQueryFiltering(security.value, item)
- setTags(security.value, 'security')
- let arr = []
- security.value.forEach((item) => {
- arr.push(item.key)
- })
- searchForm.value.secretLevel = arr + ''
- }
- //类别
- const classes = ref([{ key: 'all', name: '所有' }])
- const classess = ref([{ key: 'all', name: '所有' }])
- const getCarrierTypeByDictdata = async () => {
- const { error, code, data } = await archiveQueryApi.getCarrierTypeByDict()
- tableLoading.value = false
- if (!error && code === 200) {
- let arrdata = getArrValue(data)
- arrdata.forEach((ele) => {
- classess.value.push({ key: ele.dictKey, name: ele.dictValue })
- })
- }
- }
- const classesClick = (item) => {
- classes.value = setQueryFiltering(classes.value, item)
- setTags(classes.value, 'classes')
- let arr = []
- classes.value.forEach((item) => {
- arr.push(item.key)
- })
- searchForm.value.carrierType = arr + ''
- }
- //设置筛选条件
- const setQueryFiltering = (arr, { key, name }) => {
- if (key === 'all') {
- //如果选择所有,就删除其他
- arr = [{ key, name }]
- tags.value = tags.value.filter((item) => {
- if (item.name.indexOf === -1) {
- return item
- }
- })
- } else {
- //选中还是取消
- const index = arrIndex(arr, 'key', key)
- if (index !== -1) {
- arr.splice(index, 1)
- } else {
- arr.push({ key, name })
- }
- //如果存在所有,就删除所有。
- if (arr.length > 1) {
- const isAll = arrIndex(arr, 'key', 'all')
- if (isAll !== -1) {
- arr.splice(isAll, 1)
- }
- }
- }
- return arr
- }
- //目录树
- const nodeTreeClick = () => {
- nodeTreeModal.value = true
- getnodeTabData()
- }
- const nodeTreeModal = ref(false)
- const nodeTreeModalClose = () => {
- nodeTreeModal.value = false
- activeName.value = []
- }
- //确认
- const nodeTreeModalSave = () => {
- const allCheckIds = arrToId(nodeTreeArr.value.filter((item) => item.checkColId)).split(',')
- let halfKeys = []
- nodeTreeArr.value.forEach((ele, index) => {
- if (ele.checkColId === false) {
- let keys = nodetreeEl.value[index].getCheckedKeys()
- keys.forEach((ele) => {
- halfKeys.push(ele)
- })
- }
- })
- const ids = [...allCheckIds, ...halfKeys]
- searchForm.value.nodeIds = ids.join(',')
- nodeTreeModal.value = false
- activeName.value = []
- }
- //搜索筛选
- const filteringShow = ref('')
- const filteringChange = (name) => {
- filteringShow.value = name
- }
- //条件筛选
- const filteringClick = () => {
- if (filteringShow.value) {
- filteringShow.value = ''
- } else {
- filteringShow.value = 'show'
- }
- }
- const searchInput = ref('')
- //按文件查询
- const searchFileClick = (type) => {
- filteringShow.value = ''
- searchForm.value.searchType = type
- getTableData()
- }
- //按案卷查询
- const searchCaseClick = (type) => {
- filteringShow.value = ''
- searchForm.value.searchType = type
- getTableData()
- }
- //tab数据和相关处理
- const tabKey = ref('tab1')
- const tabData = ref([
- { key: 'tab1', name: '案卷列表' },
- { key: 'tab2', name: '档案柜' },
- ])
- const tabChange = ({ key }) => {
- tabKey.value = key
- searchForm.value.current = 1
- const { contractType } = contractInfo.value
- if (key === 'tab1') {
- searchForm.value.listType = 1
- searchForm.value.archiveType = ''
- }
- //档案柜
- if (key === 'tab2') {
- searchForm.value.listType = 2
- //1 施工,2监理,3业主
- if (Number(contractType) === 1) {
- tabGuiKey.value = '2'
- } else if (Number(contractType) === 2) {
- tabGuiKey.value = '3'
- } else if (Number(contractType) === 3) {
- tabGuiKey.value = '1'
- }
- searchForm.value.archiveType = tabGuiKey.value
- }
- getTableData()
- }
- //分页被点击
- const pageChange = ({ current, size }) => {
- searchForm.value.current = current
- searchForm.value.size = size
- getTableData()
- }
- //分页被点击
- const InpageChange = ({ current, size }) => {
- InsearchForm.value.current = current
- InsearchForm.value.size = size
- // getTableData()
- }
- //表头
- const tableRef = ref(null)
- const tableColumn = ref([
- { key: 'fileNumber', name: '档号', width: 160 },
- { key: 'name', name: '题名' },
- { key: 'secretLevelValue', name: '密级', width: 90, align: 'center' },
- { key: 'storageTimeValue', name: '保管期限', width: 100, align: 'center' },
- { key: 'pageN', name: '页数', width: 90, align: 'center' },
- { key: 'unit', name: '立卷单位', width: 160 },
- { key: 'action', name: '操作', width: 100, align: 'center', fixed: 'right' },
- ])
- const tableData = ref([])
- const pdfUrl = ref('')
- const pdfLoading = ref(false)
- const tableLoading = ref(false)
- const getTableData = async () => {
- guiItemData.value = []
- tableLoading.value = true
- searchForm.value.queryValue = searchInput.value
- for (let key in searchForm.value) {
- if (searchForm.value[key] === 'all' || searchForm.value[key] === '所有') {
- searchForm.value[key] = ''
- }
- }
- const { error, code, data } = await archiveQueryApi.getarchiveQueryPage({
- ...searchForm.value,
- projectId: projectId.value,
- contractId: contractId.value,
- })
- tableLoading.value = false
- if (!error && code === 200) {
- if (tabKey.value === 'tab1') {
- tableData.value = getArrValue(data['records'])
- searchForm.value.total = data['total'] || 0
- } else {
- guiItemData.value = getArrValue(data)
- }
- } else {
- if (tabKey.value === 'tab1') {
- tableData.value = []
- searchForm.value.total = 0
- } else {
- guiItemData.value = []
- }
- }
- //案卷列表
- if (tabKey.value === 'tab1') {
- tableFileCloseClick()
- if (searchForm.value.searchType === '2') {
- if (tableData.value.length > 0 && tableData.value[0]?.approvalFileList.length > 0) {
- // tableFileData.value =getArrValue( tableData.value[0]['approvalFileList'])
- let searchinput = searchForm.value.queryValue
- // let allarr=getArrValue( tableData.value[0]['approvalFileList'])
- fileInfo.value.id = tableData.value[0]['id']
- getArchiveFileListData().then()
- let filterarr = allarr.value.filter((item) => {
- if (item.fileName.indexOf(searchinput) !== -1) {
- return item
- }
- })
- tableFileData.value = getArrValue(filterarr)
- tableAllShow.value = true
- tableFileShow.value = true
- }
- }
- }
- }
- //多选
- const tableKeys = ref([])
- const tableSelection = (rows) => {
- tableKeys.value = rows
- }
- const tableAllShow = ref(false)
- const tableAllShowClick = () => {
- tableFileShow.value = false
- tableAllShow.value = !tableAllShow.value
- }
- //表头
- const tableFileRef = ref(null)
- const tableFileColumn = ref([
- { key: 'fileNumber', name: '文件编号', width: 180 },
- { key: 'fileName', name: '文件题名' },
- { key: 'fileTime', name: '文件日期', width: 120 },
- { key: 'dutyUser', name: '责任者', width: 120 },
- { key: 'filePage', name: '页数', width: 120 },
- { key: 'action', name: '操作', width: 120 },
- ])
- const tableFileData = ref([])
- //获取卷内文件数据
- const getArchiveFileListData = async () => {
- tableFileLoading.value = true
- const { error, code, msg, data } = await archiveQueryApi.getArchiveFileList({
- id: fileInfo.value.id, //案卷id
- })
- tableFileLoading.value = false
- //处理返回数据
- if (!error && code === 200) {
- fileInfo.value.pageNumber = data.pageNumber
- tableFileData.value = getArrValue(data['approvalFileList'])
- cscTableData1.value = getArrValue(data['approvalFileList'])
- pdfUrl.value = tableFileData.value[0]?.pdfFileUrl
- checkId.value = tableFileData.value[0]?.id
- } else {
- tableFileData.value = []
- cscTableData1.value = []
- pdfUrl.value = ''
- checkId.value = ''
- }
- }
- const tableFileLoading = ref(false)
- const tableFileSelection = (rows) => {
- console.log(rows)
- }
- //表格行被点击
- const tableFileShow = ref(false)
- const tableRowClick = ({ row }) => {
- tableAllShow.value = true
- tableFileShow.value = true
- fileInfo.value = row
- getArchiveFileListData()
- }
- const tableFileCloseClick = () => {
- tableAllShow.value = false
- tableFileShow.value = false
- }
- const viewPdf = async (id, row) => {
- // if (outUrl.indexOf(',') === -1) {
- // return outUrl
- // }
- // window.$message?.info('预览案卷需要合并pdf,需要一点时间')
- // pdfLoading.value = true
- // const { error, code, data, msg } = await tuningApi.printArchive({
- // id: id,
- // })
- // pdfLoading.value = false
- // if (!error && code === 200) {
- // if (data) {
- // return data
- // } else {
- // window.$message?.warning('文件不存在')
- // }
- // }
- //展示卷内文件的第一个
- }
- const isFile = ref('')//查阅案卷或者查阅文件
- const checkId = ref('')
- const consultFileClick = async (row, type) => {
-
- if (type === 1) {
- //查阅案卷
- getArchivesAutoView(row.id)
- fileInfo.value = row
- await getArchiveFileListData()
- isCarrySpotChecksDrawer.value = true
- // const url = await viewPdf(row.id, row)
- // pdfUrl.value = url
- // checkId.value = ''
- } else if (type == 2) {//查阅卷内文件
- checkId.value = row.id
- pdfUrl.value = row.pdfFileUrl
- getmetaInfo(checkId.value)
- isCarrySpotChecksDrawer.value = true
- }
-
- isFile.value = type
- }
- const isCarrySpotChecksDrawer = ref(false)
- const fileInfo = ref({
- name: '',
- storageTimeValue: '',
- secretLevelValue: '',
- filePage: '',
- unit: '',
- time: '',
- pageN: 0,
- })//案卷信息
- const changePdf = (row) => {
- console.log(row, 'row')
- if (pdfLoading.value === true) {
- pdfLoading.value = false
- }
- pdfUrl.value = row['pdfFileUrl'] || ''
- checkId.value = row.id
- isFile.value = 2
- getmetaInfo(checkId.value)
- }
- //类型tab数据和相关处理
- const tabTypeKey = ref('tab1')
- const tabTypeTab = ref([
- { key: 'tab1', name: '卷内文件' },
- { key: 'tab2', name: '竣工资料' },
- { key: 'tab3', name: '计量资料' },
- { key: 'tab4', name: '关联资料' },
- { key: 'tab5', name: '元数据' },
- { key: 'tab6', name: '验签包' },
- ])
- const tabTypeChange = ({ key }) => {
- tabTypeKey.value = key
- }
- const cscTableLoading = ref(false)
- //卷内目录
- const cscTableColumn1 = [
- { key: 'name', name: '卷内文件题名', align: 'center' },
- ]
- const cscTableData1 = ref([])
- //竣工资料
- const cscTableColumn2 = [
- { key: 'name', name: '竣工图资料', align: 'center' },
- ]
- const cscTableData2 = ref([])
- //计量资料
- const cscTableColumn3 = [
- { key: 'name', name: '计量资料', align: 'center' },
- ]
- const cscTableData3 = ref([
- // {id: 1, name: 'ZB2-17.pdf'},
- // {id: 2, name: 'ZB2-18.pdf'},
- // {id: 3, name: 'ZB2-19.pdf'},
- // {id: 4, name: 'ZB2-20.pdf'},
- // {id: 5, name: 'ZB2-21.pdf'},
- // {id: 6, name: 'ZB2-22.pdf'},
- // {id: 7, name: 'ZB2-23.pdf'}
- ])
- //计量资料
- const cscTableColumn4 = [
- { key: 'name', name: '关联文件', align: 'center' },
- ]
- const cscTableData4 = ref([
- // {id: 1, name: 'xxxxxxxxxxxxxxxxxxx.pdf', tag: '开工'},
- // {id: 2, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '工序'},
- // {id: 3, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '评定'},
- // {id: 4, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '交工'},
- // {id: 5, name: '', tag: '抽检'},
- // {id: 6, name: '', tag: '隐蔽'}
- ])
- //验签包
- const cscTableColumn5 = [
- { key: 'user', name: '签名者' },
- { key: 'time', name: '签名时间' },
- { key: 'val', name: '摘要' },
- ]
- const cscTableColumn51 = [
- { key: 'user', name: '签名者', width: 300 },
- { key: 'time', name: '签名时间', width: 200 },
- { key: 'val', name: '摘要' },
- ]
- const cscTableData5 = ref([])
- //抽检意见
- const reform = ref({
- type: false, content: '',
- })
- //显示右侧目录
- const isCarryDataShow = ref(true)
- const onCarryDataShow = () => {
- isCarryDataShow.value = !isCarryDataShow.value
- }
- //使用弹窗查看数据
- const cscTableDataModal = ref(false)
- const cscTableDataTitle = ref('')
- //显示弹窗
- const cscTableDataModalShow = () => {
- const key = tabTypeKey.value
- if (key === 'tab5') {
- cscTableDataTitle.value = '元数据'
- if (isFile.value == 1) {
- getArchivesAutoView(fileInfo.value.id)
- } else {
- getmetaInfo(checkId.value)
- }
- } else if (key === 'tab6') {
- cscTableDataTitle.value = '验签包'
- }
- cscTableDataModal.value = true
- }
- //关闭弹窗
- const cscTableDataModalClose = () => {
- cscTableDataModal.value = false
- }
- //关闭抽查
- const onCarrySpotChecksDrawerClose = () => {
- isCarrySpotChecksDrawer.value = false
- pdfUrl.value = ''
- }
- //tab数据和相关处理
- const nodeTabKey = ref('1')
- const nodeTabData = ref([
- { key: '1', name: '业主档案' },
- { key: '2', name: '施工档案' },
- { key: '3', name: '监理档案' },
- { key: '4', name: '文书档案' },
- ])
- const nodeTabChange = (item) => {
- nodeTabKey.value = item?.key
- getnodeTabData()
- activeName.value = []
- }
- //获取目录树getArchiveTreeByNodeType
- const checkColId = ref(false)
- const checkNodeid = ref('')
- const singleId = ref('')
- // }
- const changeCheckColId = async (item) => {
- const ids = arrToId(Nodetreedata.value).split(',')
- // if (item.checkColId) {
- // nextTick(()=>{
- // nodetreeEl?.value[treeIndex.value].setCheckedKeys(ids, true)
- // })
- // } else {
- // nodetreeEl?.value[treeIndex.value].setCheckedKeys([], false)
- // }
- }
- const nodeTreeArrLoad = ref(false)
- const getnodeTabData = async () => {
- nodeTreeArrLoad.value = true
- const { error, code, data } = await archiveQueryApi.getArchiveTreeByNodeType({
- nodeType: nodeTabKey.value,
- projectId: projectId.value,
- contractId: contractId.value,
- })
- if (!error && code === 200) {
- console.log(data, 'mulushu')
- nodeTreeArr.value = getArrValue(data)
- nodeTreeArr.value.forEach((item) => {
- item.checkColId = false
- })
- nodeTreeArrLoad.value = false
- } else {
- nodeTreeArr.value = []
- nodeTreeArrLoad.value = false
- }
- }
- const defaultProps = {
- children: 'children',
- label: 'nodeName',
- isLeaf: 'notExsitChild',
- }
- const Nodetreedata = ref([])
- const nodetreeEl = ref(null)
- const activeName = ref('')
- const nodeTreeArr = ref([])
- const treeIndex = ref(0)
- const collapseChange = async (key) => {
- checkNodeid.value = key[key.length - 1]
- await getNodetreedata()
- }
- const nodetreeElloading = ref(false)
- const getNodetreedata = async () => {
- nodetreeElloading.value = true
- const { error, code, data } = await archiveQueryApi.getChildrenNodeByNodeId({
- nodeId: checkNodeid.value,
- })
- nodetreeElloading.value = false
- if (!error && code === 200) {
- Nodetreedata.value = getArrValue(data)
- } else {
- Nodetreedata.value = []
- }
- nodeTreeArr.value.forEach((ele) => {
- if (ele.id === checkNodeid.value) {
- ele.Nodetreedata = Nodetreedata.value
- }
- })
- }
- const checkNodeids = ref([])
- const loadNode = (tree, resolve) => {
- archiveQueryApi.getChildrenNodeByNodeId({ nodeId: tree.data.id }).then((response) => {
- let resdata = getArrValue(response.data)
- resolve(resdata)
- })
- }
- //档案柜的tab数据和相关处理
- const tabGuiKey = ref('1')
- const tabGuiData = ref([
- { key: '1', name: '业主档案' },
- { key: '2', name: '施工档案' },
- { key: '3', name: '监理档案' },
- ])
- const tabGuiChange = async ({ key }) => {
- const { error, code, msg } = await archiveQueryApi.getArchivesAuthByUser({
- archiveType: key, //1业主2施工3监理
- projectId: projectId.value,
- contractId: contractId.value,
- }, false)
- //处理返回数据
- if (!error && code === 200) {
- tabGuiKey.value = key
- searchForm.value.current = 1
- searchForm.value.archiveType = tabGuiKey.value
- getTableData().then()
- } else {
- window.$message.error(msg)
- }
- }
- //测试档案柜的数据
- const guiItemData = ref([])
- const searchGuiId = ref('')
- //柜子被点击
- const guiInfoLoading = ref(false)
- const isGuiInfoDrawer = ref(false)
- const guiItemClick = (item) => {
- //同步转异步
- playVideo().then(res => {
- isGuiInfoDrawer.value = res
- })
- //处理参数
- guiInfoLoading.value = true
- searchGuiId.value = item.id
- searchForm.value.queryValue = searchInput.value
- for (let key in searchForm.value) {
- if (searchForm.value[key] === 'all' || searchForm.value[key] === '所有') {
- searchForm.value[key] = ''
- }
- }
- //发起请求, 同步转异步
- archiveQueryApi.getarchiveQueryPage({
- ...searchForm.value,
- cabinetNumber: item.id,
- projectId: projectId.value,
- contractId: contractId.value,
- }).then(({ error, code, data }) => {
- //处理返回数据
- if (!error && code === 200) {
- const arrData = getArrValue(data)
- guiInfoData.value = arrData
- if (arrData.length > 0) {
- const children = getArrValue(arrData[0]?.children)
- guiInfoCurKey.value = children[0]
- } else {
- guiInfoCurKey.value = {}
- }
- guiInfoLoading.value = false
- } else {
- guiInfoLoading.value = false
- guiInfoCurKey.value = {}
- guiInfoData.value = []
- }
- })
- }
- //播放视频
- const videoRef = ref(null)
- const isVideoShow = ref(false)
- const playVideo = () => {
- return new Promise((resolve) => {
- //播放视频
- isVideoShow.value = true
- videoRef.value?.play()
- //播放结束
- videoRef.value?.addEventListener('ended', () => {
- setTimeout(() => {
- isVideoShow.value = false
- }, 2000)
- resolve(true)
- })
- })
- }
- //柜子内部搜索
- const guiInfoSearch = async () => {
- guiInfoLoading.value = true
- //处理参数
- searchForm.value.queryValue = searchInput.value
- for (let key in searchForm.value) {
- if (searchForm.value[key] === 'all' || searchForm.value[key] === '所有') {
- searchForm.value[key] = ''
- }
- }
- //发起请求
- const { error, code, data } = await archiveQueryApi.getarchiveQueryPage({
- ...searchForm.value,
- cabinetNumber: searchGuiId.value,
- projectId: projectId.value,
- contractId: contractId.value,
- })
- //处理返回数据
- if (!error && code === 200) {
- const arrData = getArrValue(data)
- guiInfoData.value = arrData
- if (arrData.length > 0) {
- const children = getArrValue(arrData[0]?.children)
- guiInfoCurKey.value = children[0]
- } else {
- guiInfoCurKey.value = {}
- }
- guiInfoLoading.value = false
- } else {
- guiInfoLoading.value = false
- guiInfoCurKey.value = {}
- guiInfoData.value = []
- }
- }
- //关闭抽屉
- const onCloseGuiInfoDrawer = () => {
- isGuiInfoDrawer.value = false
- searchForm.value.innerSearch = ''
- }
- //案卷文件数据
- const guiInfoCurKey = ref({})
- const guiInfoData = ref([])
- //点击档案
- const guiFileInfo = (item) => {
- guiInfoCurKey.value = item
- }
- //获取元数据
- const cscmetaTableLoading = ref(false)
- const cscmetaDataTabledata = ref([])
- //获取文件元数据信息
- const getmetaInfo = async (fileId) => {
- console.log(fileId, 'fileId')
- cscmetaTableLoading.value = true
- const { error, code, data } = await tuningApi.getMetadataFileByid({
- fileId,
- })
- cscmetaTableLoading.value = false
- if (!error && code === 200) {
- cscmetaDataTabledata.value = getArrValue(data)
- } else {
- cscmetaDataTabledata.value = []
- }
- }
- //获取案卷元数据信息
- const getArchivesAutoView = async (fileId) => {
- cscmetaTableLoading.value = true
- const { error, code, data } = await tuningApi.getArchivesAutoView({
- id: fileId,
- })
- cscmetaTableLoading.value = false
- if (!error && code === 200) {
- let obj = getObjValue(data)
- cscmetaDataTabledata.value = [
- { containerName: '题名', keyValue: '', isType: 3 },
- { containerName: '档号', keyValue: obj?.fileNumber, isType: 2 },
- { containerName: '文件件数', keyValue: obj?.fileN, isType: 2 },
- { containerName: '移交时间', keyValue: '', isType: 2 },
- ]
- } else {
- cscmetaDataTabledata.value = []
- }
- }
- //语音搜索
- const mediaMicChange = (data) => {
- searchInput.value = data.queryValue
- searchForm.value.searchType = 1
- searchForm.value.current = 1
- Object.keys(data).forEach(key => {
- searchForm.value[key] = data[key]
- })
- getTableData()
- }
- //批量下载档案
- const batchLoading = ref(false)
- const batchClick = async () => {
- const ids = arrToId(tableKeys.value)
- batchLoading.value = true
- const { res, msg, headers } = await archiveQueryApi.batchDownloadFileToZip(
- { ids: ids },
- )
- batchLoading.value = false
- if (res) {
- downloadBlob(res, headers['content-disposition'], 'application/zip')
- window.$message.success('下载成功')
- }
- }
- </script>
- <style lang="scss">
- @import '~style/using/query.scss';
- @import '~src/styles/theme/using/query.scss';
- </style>
|