123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414 |
- <template>
- <div id="submit-report-layout-target" class="hc-page-box">
- <hc-new-card scrollbar>
- <template #header>
- <HcNewSwitch
- :datas="tabData" :keys="tabKey" :round="false" style="margin-right: 24px"
- @change="tabChange"
- />
- <HcTooltip keys="transfer_initial_expert_btn_preview">
- <el-button hc-btn type="primary" @click="previewClick">
- <HcIcon name="file-pdf" />
- <span>预览</span>
- </el-button>
- </HcTooltip>
- </template>
- <template #extra>
- <!-- transfer_initial_expert_btn_sampling -->
- <el-button color="#0581fe" hc-btn @click="submitReportClick">
- <HcIcon name="shield-check" />
- <span>开始抽检</span>
- </el-button>
- <HcTooltip keys="transfer_initial_expert_btn_submit_report">
- <el-button color="#7f83f7" hc-btn style="color: white" @click="writingConclusionClick">
- <HcIcon name="git-pull-request" />
- <span>编写结论</span>
- </el-button>
- </HcTooltip>
- <HcTooltip keys="transfer_initial_expert_btn_history_report">
- <el-button color="#38b54a" hc-btn style="color: white" @click="onSubmitReportClick">
- <HcIcon name="history" />
- <span>查看验收报告</span>
- </el-button>
- </HcTooltip>
- </template>
-
- <div v-if="totalData.length > 0" v-loading="totalLoaing" class="h-screen">
- <div v-for="(item, index) in totalData" :key="index">
- <div class="hc-card-table-title">{{ item?.unitInfo }}</div>
- <template v-for="(item1, index1) in item?.nodeLists" :key="index1">
- <HcCardItem v-if="item1.list && item1.list.length > 0" ui="h-half">
- <template #header>
- <span>{{ item1.nodeInfo }}</span>
- <!-- <span class="text-gray">(238卷)</span> -->
- </template>
- <div :style="`height: ${item1.list !== null && item1.list.length > 9 ? '300px' : 'auto'};`">
- <!-- <HcTable
- ref="tableRef" :column="tableColumn" :datas="item1.list" :loading="tableLoading"
- is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
- @selection-change="tableSelection"
- /> -->
- <visualTable :table-data="item1.list " :is-check="false" @get-table-keys="getTableKeys" />
- </div>
- </HcCardItem>
- </template>
- </div>
- </div>
-
- <div v-else class=" h-screen">
- <HcNoData />
- </div>
- </hc-new-card>
- <!-- 历史报告 -->
- <HcDrawer
- :show="isSubmitReportDrawer" to-id="submit-report-layout-target" uis="hc-submit-report-target"
- @close="onSubmitReportDrawerClose"
- >
- <template #header>
- <div class="hc-select-view w-52">
- <el-select v-model="pdfDate" placeholder="选择日期" @change="changePdfDate">
- <el-option v-for="item in timeData " :label="item" :value="item" />
- </el-select>
- </div>
- <div class="hc-title-view">{{ tableTitle }}</div>
- </template>
- <template #extra>
- <div class="hc-icon-view text-hover" @click="onSubmitReportDrawerClose">
- <HcIcon name="close" />
- </div>
- </template>
- <HcPdf
- :src="curPdf"
- />
- </HcDrawer>
- </div>
- </template>
- <script setup>
- import { onMounted, ref } from 'vue'
- import { useRouter } from 'vue-router'
- import { useAppStore } from '~src/store'
- import initialgApi from '~api/initial/initial'
- import { arrToKey, getArrValue, isObjNull } from 'js-fast-way'
- import visualTable from './components/visual-table.vue'
- //变量
- const router = useRouter()
- const useAppState = useAppStore()
- const projectId = ref(useAppState.getProjectId)
- const contractId = ref(useAppState.getContractId)
- const projectInfo = ref(useAppState.getProjectInfo)
- //渲染完成
- onMounted(() => {
- getTotalData()
- })
- //tab数据和相关处理
- const tabKey = ref('1')
- const tabData = ref([
- { key: '1', name: '建设单位归档资料' },
- { key: '2', name: '监理单位归档资料' },
- { key: '3', name: '施工单位归档资料' },
- { key: '4', name: '科研、新技术资料' },
- ])
- const tabChange = (item) => {
- tabKey.value = item?.key
- getTotalData()
- }
- //多选
- const tableKeys = ref([])
- const getTableKeys = (val)=>{
- tableKeys.value = val
- }
- const totalData = ref([])
- const totalLoaing = ref(false)
- const getTotalData = async ()=>{
- totalLoaing.value = true
- const { error, code, data } = await initialgApi.getUnitArchivesAutoView({
- projectId: projectId.value,
- unitType:tabKey.value,
- })
- totalLoaing.value = false
- if (!error && code === 200) {
- if (!isObjNull(data)) {
- totalData.value = [ data]
- } else {
- totalData.value = []
- }
-
-
- } else {
- totalData.value = []
-
- }
- }
- //------立项审批
- //搜索表单
- const searchForm = ref({
- current: 1, size: 20, total: 0,
- })
- //分页被点击
- const pageChange = ({ current, size }) => {
- searchForm.value.current = current
- searchForm.value.size = size
- getTableData()
- }
- //表头
- const tableRef = ref(null)
- const tableColumn = ref([
- { key:'fileNumber', name: '档号', width: 180 },
- { key:'name', name: '案卷题名' },
- { key:'pageN', name: '总页数', width: 120 },
- { key:'storageTimeValue', name: '保管期限', width: 120 },
- { key:'remark', name: '备注' },
- ])
- const tableData = ref([
- {
- id: 1,
- key1: 'FJZB-02-123',
- key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
- key3: '293',
- key4: '永久',
- key5: '备注信息',
- },
- {
- id: 2,
- key1: 'FJZB-02-123',
- key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
- key3: '293',
- key4: '永久',
- key5: '备注信息',
- },
- {
- id: 2,
- key1: 'FJZB-02-123',
- key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
- key3: '293',
- key4: '永久',
- key5: '备注信息',
- },
- ])
- //获取数据
- const tableLoading = ref(false)
- const getTableData = async () => {
- }
- //------勘察设计文件
- //搜索表单
- const searchFormFile = ref({
- current: 1, size: 20, total: 0,
- })
- //分页被点击
- const pageFileChange = ({ current, size }) => {
- searchFormFile.value.current = current
- searchFormFile.value.size = size
- getTableFileData()
- }
- //表头
- const tableFileRef = ref(null)
- const tableFileColumn = ref([
- { key: 'key1', name: '档号', width: 180 },
- { key: 'key2', name: '案卷题名' },
- { key: 'key3', name: '总页数', width: 120 },
- { key: 'key4', name: '保管期限', width: 120 },
- { key: 'key5', name: '备注' },
- ])
- const tableFileData = ref([
- {
- id: 1,
- key1: 'FJZB-02-123',
- key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
- key3: '293',
- key4: '永久',
- key5: '备注信息',
- },
- {
- id: 2,
- key1: 'FJZB-02-123',
- key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
- key3: '293',
- key4: '永久',
- key5: '备注信息',
- },
- {
- id: 2,
- key1: 'FJZB-02-123',
- key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
- key3: '293',
- key4: '永久',
- key5: '备注信息',
- },
- ])
- //获取数据
- const getTableFileData = async () => {
- }
- //编写结论
- const writingConclusionClick = () => {
- router.push({
- name: 'transfer-writing-conclusion',
- })
- }
- //开始抽检
- const submitReportClick = async () => {
- const { error, code, data, msg } = await initialgApi.startInspect({
- projectId: projectId.value,
-
- })
-
- if (!error && code === 200) {
-
- console.log(data, 'data')
- if (data) {
- router.push({
- name: 'transfer-entry-sampling',
- })
- } else {
- router.push({
- name: 'transfer-preliminary-examination',
- })
- }
-
- }
- // router.push({
- // name: 'transfer-entry-sampling',
- // })
- }
- //历史报告
- //历史报告
- const isSubmitReportDrawer = ref(false)
- const reportData = ref([])
- const timeData = ref([])
- const onSubmitReportClick = async () => {
- const { error, code, data } = await initialgApi.getHistoryTable({
- projectId: projectId.value,
- })
- if (!error && code === 200) {
- reportData.value = getArrValue(data)
- const dataString = arrToKey( reportData.value, 'approveDate', ',')
- timeData.value = dataString.split(',')
- if (timeData.value.length > 0) {
- pdfDate.value = timeData.value[0]
- curPdf.value = reportData.value[0].tableUrl
- tableTitle.value = reportData.value[0].tableTitle
- isSubmitReportDrawer.value = true
- }
-
- } else {
- reportData.value = []
-
- }
-
- }
- const pdfDate = ref(null)
- const curPdf = ref('')
- const tableTitle = ref('')
- //历史报告
- const onSubmitReportDrawerClose = () => {
- isSubmitReportDrawer.value = false
- curPdf.value = ''
- }
- const changePdfDate = (val)=>{
- reportData.value.forEach((ele)=>{
- if (ele.approveDate === val) {
- curPdf.value = ele.tableUrl
- tableTitle.value = ele.tableTitle
- }
- })
- }
- //预览
- const previewClick = async ()=>{
- const { error, code, data, msg } = await initialgApi.getAppPreview({
- projectId: projectId.value,
- })
- if (!error && code === 200) {
- if (data) {
- window.open(data, '_blank')
- } else {
- window.$message?.warning('文件不存在')
- }
- }
- }
- //查看验收报告
- // const getReportClick = async ()=>{
- // const { error, code, data, msg } = await initialgApi.getTable({
- // projectId: projectId.value,
- // })
- // if (!error && code === 200) {
- // if (data) {
- // window.open(data, '_blank')
- // } else {
- // window.$message?.warning('文件不存在')
- // }
- // }
- // }
- </script>
- <style lang="scss" scoped>
- @import '~style/transfer/scoped/initial-expert.scss';
- </style>
- <style lang="scss">
- .hc-submit-report-target.el-overlay {
- position: absolute;
- margin: -24px;
- height: revert;
- background-color: transparent;
- .hc-drawer-box.el-drawer {
- --el-drawer-bg-color: transparent;
- .el-drawer__body {
- padding: 24px;
- overflow: hidden;
- .hc-card-box {
- padding: 10px;
- .el-card__header {
- padding: 10px;
- .hc-card-header-box .hc-card-header {
- .hc-select-view {
- position: absolute;
- z-index: 11;
- }
- .hc-title-view {
- font-weight: bold;
- font-size: 20px;
- text-align: center;
- position: relative;
- width: 100%;
- }
- .hc-icon-view {
- position: absolute;
- right: 0;
- font-size: 26px;
- z-index: 11;
- }
- }
- }
- .el-card__body {
- padding: 10px;
- }
- }
- }
- }
- }
- </style>
|