|
@@ -5,9 +5,7 @@
|
|
uis="hc-carry-spot-checks-target" @close="onCarrySpotChecksDrawerClose"
|
|
uis="hc-carry-spot-checks-target" @close="onCarrySpotChecksDrawerClose"
|
|
>
|
|
>
|
|
<div class="hc-carry-spot-checks-pdf">
|
|
<div class="hc-carry-spot-checks-pdf">
|
|
- <HcPdf
|
|
|
|
- src="https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221212/ce9799c7d18efc03efefd6f242439f2e.pdf"
|
|
|
|
- />
|
|
|
|
|
|
+ <HcPdf v-loading="pdfLoading" :src="pdfUrl" />
|
|
<el-tooltip :disabled="!isBubble" content="展开/收起 右侧目录" placement="top">
|
|
<el-tooltip :disabled="!isBubble" content="展开/收起 右侧目录" placement="top">
|
|
<div class="hc-csc-pdf-btn" @click="onCarryDataShow">
|
|
<div class="hc-csc-pdf-btn" @click="onCarryDataShow">
|
|
<HcIcon v-show="isCarryDataShow" name="arrow-right-s" />
|
|
<HcIcon v-show="isCarryDataShow" name="arrow-right-s" />
|
|
@@ -27,7 +25,7 @@
|
|
<div class="hc-info-text-item">
|
|
<div class="hc-info-text-item">
|
|
<div class="title">案卷题名:</div>
|
|
<div class="title">案卷题名:</div>
|
|
<div class="content">
|
|
<div class="content">
|
|
- 安康至来凤国家高速公路奉节至巫山(渝鄂界)段干岩洞隧道LK3+425~LK3+393初期支护钢筋网分项开工报告、检验申请批复单、质量检验报告单、记录表、试验检测记录及评定报告、中间交工证书
|
|
|
|
|
|
+ {{ fileInfo.name }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="hc-info-text-item">
|
|
<div class="hc-info-text-item">
|
|
@@ -35,23 +33,26 @@
|
|
<span>密</span>
|
|
<span>密</span>
|
|
<span class="ml-7">级:</span>
|
|
<span class="ml-7">级:</span>
|
|
</div>
|
|
</div>
|
|
- <div class="content">机密</div>
|
|
|
|
|
|
+ <div class="content"> {{ fileInfo.secretLevelValue }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="hc-info-text-item">
|
|
<div class="hc-info-text-item">
|
|
<div class="title">保管期限:</div>
|
|
<div class="title">保管期限:</div>
|
|
- <div class="content">永久</div>
|
|
|
|
|
|
+ <div class="content"> {{ fileInfo.storageTimeValue }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="hc-info-text-item">
|
|
<div class="hc-info-text-item">
|
|
<div class="title">卷内文件:</div>
|
|
<div class="title">卷内文件:</div>
|
|
- <div class="content">9</div>
|
|
|
|
|
|
+ <div class="content"> {{ fileInfo.pageNumber }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="hc-info-text-item">
|
|
<div class="hc-info-text-item">
|
|
<div class="title">起止日期:</div>
|
|
<div class="title">起止日期:</div>
|
|
- <div class="content">2022.02.12~2023.11.02</div>
|
|
|
|
|
|
+ <div v-if="fileInfo?.endDate !== '' || fileInfo?.startDate !== null" class="content">
|
|
|
|
+ {{ `${splitDate(fileInfo?.startDate)}~${splitDate(fileInfo?.endDate)}` }}
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else class="content" />
|
|
</div>
|
|
</div>
|
|
<div class="hc-info-text-item">
|
|
<div class="hc-info-text-item">
|
|
<div class="title">立卷单位:</div>
|
|
<div class="title">立卷单位:</div>
|
|
- <div class="content">贵州路桥集团xxxxx</div>
|
|
|
|
|
|
+ <div class="content"> {{ fileInfo.unit }}</div>
|
|
</div>
|
|
</div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
@@ -61,7 +62,7 @@
|
|
:is-index="false" :loading="cscTableLoading" is-new :index-style="{ width: 60 }"
|
|
:is-index="false" :loading="cscTableLoading" is-new :index-style="{ width: 60 }"
|
|
>
|
|
>
|
|
<template #name="{ row }">
|
|
<template #name="{ row }">
|
|
- <div :class="row.id === 2 ? 'text-link' : 'text-hover'">{{ row?.name }}</div>
|
|
|
|
|
|
+ <div :class="row.id === checkId ? 'text-link' : 'text-hover'" @click="changePdf(row)">{{ row?.fileName }}</div>
|
|
</template>
|
|
</template>
|
|
</HcTable>
|
|
</HcTable>
|
|
|
|
|
|
@@ -95,7 +96,7 @@
|
|
</template>
|
|
</template>
|
|
</HcTable>
|
|
</HcTable>
|
|
|
|
|
|
- <MetaTable v-if="tabTypeKey === 'tab5'" :loading="cscTableLoading" />
|
|
|
|
|
|
+ <MetaTable v-if="tabTypeKey === 'tab5'" :loading="cscmetaTableLoading" :meta-data-table="cscmetaDataTabledata" :ishow-file="ishowFile" />
|
|
|
|
|
|
<HcTable
|
|
<HcTable
|
|
v-if="tabTypeKey === 'tab6'" :column="cscTableColumn5" :datas="cscTableData5"
|
|
v-if="tabTypeKey === 'tab6'" :column="cscTableColumn5" :datas="cscTableData5"
|
|
@@ -112,7 +113,7 @@
|
|
</div>
|
|
</div>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</div>
|
|
</div>
|
|
- <div class="hc-csc-action-box">
|
|
|
|
|
|
+ <div v-if="checkId" class="hc-csc-action-box">
|
|
<div class="header-box">
|
|
<div class="header-box">
|
|
<div class="title">抽检意见:</div>
|
|
<div class="title">抽检意见:</div>
|
|
<div class="extra">
|
|
<div class="extra">
|
|
@@ -120,18 +121,19 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="textarea-box">
|
|
<div class="textarea-box">
|
|
- <el-input
|
|
|
|
- v-model="reform.content" :autosize="{ minRows: 5 }" placeholder="请填写抽检意见"
|
|
|
|
- resize="none"
|
|
|
|
- type="textarea"
|
|
|
|
- />
|
|
|
|
|
|
+ <div v-if="ishowAllopinion">
|
|
|
|
+ <el-input v-model="reform.content" type="textarea" :autosize="{ minRows: 5 }" resize="none" placeholder="请填写抽检意见" @focus="contentClick" />
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else>
|
|
|
|
+ <el-input ref="saveTagInput" v-model="reform.myOpinion" type="textarea" :autosize="{ minRows: 5 }" resize="none" placeholder="请填写抽检意见" />
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="btn-box">
|
|
<div class="btn-box">
|
|
<el-button hc-btn @click="onCarrySpotChecksDrawerClose">
|
|
<el-button hc-btn @click="onCarrySpotChecksDrawerClose">
|
|
<HcIcon name="close" />
|
|
<HcIcon name="close" />
|
|
<span>{{ closeText }}</span>
|
|
<span>{{ closeText }}</span>
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button hc-btn type="primary" @click="checkClick">
|
|
|
|
|
|
+ <el-button hc-btn type="primary" :loading="submitLoading" @click="submitOpinion">
|
|
<HcIcon name="check" />
|
|
<HcIcon name="check" />
|
|
<span>{{ checkText }}</span>
|
|
<span>{{ checkText }}</span>
|
|
</el-button>
|
|
</el-button>
|
|
@@ -142,7 +144,7 @@
|
|
|
|
|
|
<!-- 使用弹窗查看数据 -->
|
|
<!-- 使用弹窗查看数据 -->
|
|
<hc-new-dialog v-model="cscTableDataModal" :footer="false" :title="cscTableDataTitle" is-table widths="1080px" @close="cscTableDataModalClose">
|
|
<hc-new-dialog v-model="cscTableDataModal" :footer="false" :title="cscTableDataTitle" is-table widths="1080px" @close="cscTableDataModalClose">
|
|
- <MetaTable v-if="tabTypeKey === 'tab5'" :loading="cscTableLoading" />
|
|
|
|
|
|
+ <MetaTable v-if="tabTypeKey === 'tab5'" :loading="cscmetaTableLoading" :meta-data-table="cscmetaDataTabledata" :ishow-file="ishowFile" />
|
|
<HcTable
|
|
<HcTable
|
|
v-if="tabTypeKey === 'tab6'" :column="cscTableColumn51" :datas="cscTableData5"
|
|
v-if="tabTypeKey === 'tab6'" :column="cscTableColumn51" :datas="cscTableData5"
|
|
:loading="cscTableLoading" is-new :index-style="{ width: 60 }"
|
|
:loading="cscTableLoading" is-new :index-style="{ width: 60 }"
|
|
@@ -152,9 +154,13 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { ref, watch } from 'vue'
|
|
|
|
|
|
+import { nextTick, onActivated, onMounted, ref, watch } from 'vue'
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
import MetaTable from './meta-table.vue'
|
|
import MetaTable from './meta-table.vue'
|
|
|
|
+import archiveQueryApi from '~api/using/query.js'
|
|
|
|
+import { getArrValue, getObjValue } from 'js-fast-way'
|
|
|
|
+import tuningApi from '~api/archiveConfig/tuning.js'
|
|
|
|
+import initialgApi from '~api/initial/initial'
|
|
|
|
|
|
//参数
|
|
//参数
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -178,6 +184,14 @@ const props = defineProps({
|
|
type: [String, Number],
|
|
type: [String, Number],
|
|
default: '保存抽检意见',
|
|
default: '保存抽检意见',
|
|
},
|
|
},
|
|
|
|
+ fileId:{
|
|
|
|
+ type: [String, Number],
|
|
|
|
+ default: '', //案卷ID
|
|
|
|
+ },
|
|
|
|
+ fileInfo:{
|
|
|
|
+ type: Object,
|
|
|
|
+ default: () => ({}),
|
|
|
|
+ },
|
|
})
|
|
})
|
|
|
|
|
|
//事件
|
|
//事件
|
|
@@ -191,17 +205,44 @@ const contractId = ref(props.contractId)
|
|
const nodeData = ref(props.treeData)
|
|
const nodeData = ref(props.treeData)
|
|
const isBubble = ref(useAppState.getBubble)
|
|
const isBubble = ref(useAppState.getBubble)
|
|
const isDrawer = ref(props.show)
|
|
const isDrawer = ref(props.show)
|
|
|
|
+const fileId = ref(props.fileId)//案卷ID
|
|
|
|
+const fileInfo = ref(props.fileInfo)//案卷ID
|
|
|
|
+const userInfo = ref(useAppState.getUserInfo)
|
|
|
|
|
|
//监听
|
|
//监听
|
|
watch(() => [
|
|
watch(() => [
|
|
props.show,
|
|
props.show,
|
|
useAppState.getBubble,
|
|
useAppState.getBubble,
|
|
-], ([show, bubble]) => {
|
|
|
|
|
|
+ props.fileId,
|
|
|
|
+ props.fileInfo,
|
|
|
|
+], ([show, bubble, FileId, FileInfo]) => {
|
|
|
|
+
|
|
isDrawer.value = show
|
|
isDrawer.value = show
|
|
isBubble.value = bubble
|
|
isBubble.value = bubble
|
|
|
|
+ fileId.value = FileId
|
|
|
|
+ fileInfo.value = FileInfo
|
|
|
|
+ console.log( fileInfo.value, ' fileInfo.value1111')
|
|
|
|
+ if (fileId.value) {
|
|
|
|
+ getArchiveFileListData()
|
|
|
|
+ let url
|
|
|
|
+ viewPdf(fileId.value).then((res)=>{
|
|
|
|
+ console.log(res, 'res')
|
|
|
|
+ url = res
|
|
|
|
+ pdfUrl.value = url
|
|
|
|
+ if (pdfUrl.value && pdfUrl?.value.length > 0 ) {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ serReviewFile()
|
|
|
|
+ }, 30000)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
|
|
-
|
|
|
|
|
|
+onMounted(()=>{
|
|
|
|
+ console.log(fileId.value, 'fileId.value')
|
|
|
|
+
|
|
|
|
+})
|
|
//类型tab数据和相关处理
|
|
//类型tab数据和相关处理
|
|
const tabTypeKey = ref('tab1')
|
|
const tabTypeKey = ref('tab1')
|
|
const tabTypeTab = ref([
|
|
const tabTypeTab = ref([
|
|
@@ -222,16 +263,102 @@ const cscTableLoading = ref(false)
|
|
const cscTableColumn1 = [
|
|
const cscTableColumn1 = [
|
|
{ key: 'name', name: '卷内文件题名', align: 'center' },
|
|
{ key: 'name', name: '卷内文件题名', align: 'center' },
|
|
]
|
|
]
|
|
-const cscTableData1 = ref([
|
|
|
|
- // {id: 1, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
|
|
|
|
- // {id: 2, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
|
|
|
|
- // {id: 3, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
|
|
|
|
- // {id: 4, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
|
|
|
|
- // {id: 5, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
|
|
|
|
- // {id: 6, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
|
|
|
|
- // {id: 7, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'}
|
|
|
|
-])
|
|
|
|
|
|
+const cscTableData1 = ref([])
|
|
|
|
+//获取卷内文件数据
|
|
|
|
+
|
|
|
|
+const getArchiveFileListData = async ()=>{
|
|
|
|
+ const { error, code, msg, data } = await archiveQueryApi.getArchiveFileList({
|
|
|
|
+ id: fileId.value, //案卷id
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ //处理返回数据
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ fileInfo.value.pageNumber = data.pageNumber
|
|
|
|
+
|
|
|
|
+ cscTableData1.value = getArrValue(data['approvalFileList'])
|
|
|
|
+ if (cscTableData1.value.length > 0) {
|
|
|
|
+ checkmetaFileId.value = cscTableData1.value[0].id
|
|
|
|
+ getmetaInfo()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ cscTableData1.value = []
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+const ishowFile = ref(false)
|
|
|
|
+const pdfLoading = ref(false)
|
|
|
|
+const pdfUrl = ref('')
|
|
|
|
+const checkId = ref('')
|
|
|
|
+const checkmetaFileId = ref('')
|
|
|
|
+const ishowAllopinion = ref(false)
|
|
|
|
+const saveTagInput = ref(null)
|
|
|
|
+const contentClick = ()=>{
|
|
|
|
+ console.log(11111)
|
|
|
|
+ ishowAllopinion.value = false
|
|
|
|
+ nextTick(()=>{
|
|
|
|
+ saveTagInput.value?.focus()
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+const changePdf = (row)=>{
|
|
|
|
+ console.log(row, 'row')
|
|
|
|
+ ishowFile.value = true
|
|
|
|
+ pdfLoading.value = false
|
|
|
|
+ pdfUrl.value = row['pdfFileUrl'] || ''
|
|
|
|
+ checkId.value = row.id
|
|
|
|
+ checkmetaFileId.value = row.id
|
|
|
|
+ getmetaInfo()
|
|
|
|
+ ishowAllopinion.value = true
|
|
|
|
+
|
|
|
|
+ getopiniondata()
|
|
|
|
+ if (pdfUrl.value && pdfUrl?.value.length > 0) {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ serReviewFile()
|
|
|
|
+ }, 300000)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
|
|
+}
|
|
|
|
+//设置为已查阅
|
|
|
|
+const serReviewFile = async ()=>{
|
|
|
|
+ const { error, code, data, msg } = await initialgApi.updateInspectStatus({
|
|
|
|
+ archiveId: fileInfo.value.id,
|
|
|
|
+ projectId:projectId.value,
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+const opid = ref('')
|
|
|
|
+
|
|
|
|
+//获取抽检意见
|
|
|
|
+const getopiniondata = async ()=>{
|
|
|
|
+ const { error, code, data, msg } = await initialgApi.getOpinion({
|
|
|
|
+ fileId: checkId.value,
|
|
|
|
+ })
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ console.log(data, 'data')
|
|
|
|
+ let opiniondata = getObjValue(data)
|
|
|
|
+ reform.value.content = opiniondata?.allOpinion
|
|
|
|
+ reform.value.type = opiniondata?.allOpinion?.length > 0 ? true : false
|
|
|
|
+ reform.value.myOpinion = opiniondata?.opinion
|
|
|
|
+ opid.value = opiniondata?.id
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+//获取元数据信息
|
|
|
|
+//获取元数据
|
|
|
|
+const cscmetaTableLoading = ref(false)
|
|
|
|
+const cscmetaDataTabledata = ref([])
|
|
|
|
+const getmetaInfo = async (fileId)=>{
|
|
|
|
+
|
|
|
|
+ cscmetaTableLoading.value = true
|
|
|
|
+ const { error, code, data } = await tuningApi.getMetadataFileByid({
|
|
|
|
+ fileId: checkmetaFileId.value,
|
|
|
|
+ })
|
|
|
|
+ cscmetaTableLoading.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ cscmetaDataTabledata.value = getArrValue(data)
|
|
|
|
+ } else {
|
|
|
|
+ cscmetaDataTabledata.value = []
|
|
|
|
+ }
|
|
|
|
+}
|
|
//竣工资料
|
|
//竣工资料
|
|
const cscTableColumn2 = [
|
|
const cscTableColumn2 = [
|
|
{ key: 'name', name: '竣工图资料', align: 'center' },
|
|
{ key: 'name', name: '竣工图资料', align: 'center' },
|
|
@@ -359,12 +486,62 @@ const cscTableDataModalClose = () => {
|
|
//关闭抽查
|
|
//关闭抽查
|
|
const onCarrySpotChecksDrawerClose = () => {
|
|
const onCarrySpotChecksDrawerClose = () => {
|
|
isDrawer.value = false
|
|
isDrawer.value = false
|
|
|
|
+ ishowFile.value = false
|
|
|
|
+ checkmetaFileId.value = ''
|
|
|
|
+ checkId.value = ''
|
|
emit('close', false)
|
|
emit('close', false)
|
|
}
|
|
}
|
|
|
|
|
|
const checkClick = () => {
|
|
const checkClick = () => {
|
|
emit('check')
|
|
emit('check')
|
|
}
|
|
}
|
|
|
|
+const submitLoading = ref(false)
|
|
|
|
+const submitOpinion = async ()=>{
|
|
|
|
+ submitLoading.value = true
|
|
|
|
+ const { error, code, data, msg } = await initialgApi.saveInspect({
|
|
|
|
+ fileId: checkId.value,
|
|
|
|
+ archiveId:fileInfo.value.id,
|
|
|
|
+ // opinion:reform.value.content,
|
|
|
|
+ opinion:reform.value.myOpinion,
|
|
|
|
+ projectId:projectId.value,
|
|
|
|
+ userId:userInfo.value.user_id,
|
|
|
|
+ archiveName:fileInfo.value.name,
|
|
|
|
+ id: opid.value || null,
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ submitLoading.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window.$message.success(msg)
|
|
|
|
+ serReviewFile()
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ // addOpinion
|
|
|
|
+}
|
|
|
|
+//截取日期
|
|
|
|
+const splitDate = (val)=>{
|
|
|
|
+ if (val) {
|
|
|
|
+ return val?.substring(0, 10)
|
|
|
|
+ } else {
|
|
|
|
+ return ''
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+//查阅案卷pdf
|
|
|
|
+const viewPdf = async (id) => {
|
|
|
|
+ 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('文件不存在')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|