|
@@ -4,6 +4,12 @@
|
|
|
<HcTree :project-id="projectId" :contract-id="contractId" :auto-expand-keys="treeAutoExpandKeys" @node-tap="projectTreeClick" @node-loading="treeNodeLoading" @menu-tap="ElTreeMenuClick" />
|
|
|
</template>
|
|
|
<hc-new-card v-show="!isCarrySpotChecksDrawer" title="已形成的案卷">
|
|
|
+ <template #extra>
|
|
|
+ <el-button hc-btn :disabled="!searchForm.nodeIds" :loading="downLoading" type="primary" @click="downloadArchiveAutoExcelClick">
|
|
|
+ <HcIcon name="download" />
|
|
|
+ 下载案卷目录
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
<HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" is-new :index-style="{ width: 60 }" @row-click="tableRowClick">
|
|
|
<template #name="{ row }">
|
|
|
<div class="text-link" :class="row.isReviewed === 1 ? 'text-green' : 'text-blue'">{{ row?.name }}</div>
|
|
@@ -169,13 +175,14 @@
|
|
|
<script setup>
|
|
|
import { nextTick, onActivated, onMounted, ref, watch } from 'vue'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
-import { getArrValue, getObjValue } from 'js-fast-way'
|
|
|
+import { downloadBlob, getArrValue, getObjValue } from 'js-fast-way'
|
|
|
import HcTree from '~src/components/tree/hc-tree.vue'
|
|
|
import MetaTable from './components/meta-table.vue'
|
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
|
import tuningApi from '~api/archiveConfig/tuning.js'
|
|
|
import archiveQueryApi from '~api/using/query.js'
|
|
|
import inspectApi from '~api/transfer/inspects.js'
|
|
|
+import tuning from '../../../api/modules/archiveConfig/tuning'
|
|
|
|
|
|
//变量
|
|
|
const useAppState = useAppStore()
|
|
@@ -647,6 +654,23 @@ const getmetaInfo = async (fileId)=>{
|
|
|
cscmetaDataTabledata.value = []
|
|
|
}
|
|
|
}
|
|
|
+//下载案卷目录
|
|
|
+const downLoading = ref(false)
|
|
|
+
|
|
|
+
|
|
|
+const downloadArchiveAutoExcelClick = async () => {
|
|
|
+
|
|
|
+ downLoading.value = true
|
|
|
+ const { res, msg, headers } = await tuning.downloadArchiveAutoExcel(
|
|
|
+ { projectId: projectId.value, contractId: contractId.value, nodeId: searchForm.value.nodeIds },
|
|
|
+ )
|
|
|
+ downLoading.value = false
|
|
|
+ if (res) {
|
|
|
+ downloadBlob(res, headers['content-disposition'], 'application/zip')
|
|
|
+ window.$message.success('下载成功')
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|