inspects.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. <template>
  2. <div id="carry-spot-checks-layout-target1" class="hc-page-layout-box">
  3. <div v-show="!isCarrySpotChecksDrawer" class="hc-layout-left-box" :style="`width:${leftWidth}px;`">
  4. <div class="hc-project-box">
  5. <div class="hc-project-icon-box">
  6. <HcIcon name="stack" />
  7. </div>
  8. <div class="ml-2 project-name-box">
  9. <span class="text-xl text-cut project-alias">{{ projectInfo.projectAlias }}</span>
  10. <div class="text-xs text-cut project-name">
  11. {{ projectInfo.name }}
  12. </div>
  13. </div>
  14. </div>
  15. <div v-loading="treeLoading" class="hc-tree-box" element-loading-text="加载中...">
  16. <el-scrollbar>
  17. <HcTree :project-id="projectId" :contract-id="contractId" :auto-expand-keys="treeAutoExpandKeys" @nodeTap="projectTreeClick" @nodeLoading="treeNodeLoading" @menuTap="ElTreeMenuClick" />
  18. </el-scrollbar>
  19. </div>
  20. <!-- 左右拖动 -->
  21. <div class="horizontal-drag-line" @mousedown="onmousedown" />
  22. </div>
  23. <div v-show="!isCarrySpotChecksDrawer" class="hc-page-content-box">
  24. <HcCard title="已形成的案卷">
  25. <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" @row-click="tableRowClick">
  26. <template #name="{ row }">
  27. <div class="text-link" :class="row.isReviewed === 1 ? 'text-green' : 'text-blue'">
  28. {{ row?.name }}
  29. </div>
  30. </template>
  31. </HcTable>
  32. <template #action>
  33. <HcPages :pages="searchForm" @change="pageChange" />
  34. </template>
  35. </HcCard>
  36. </div>
  37. <!-- 展开抽查 -->
  38. <HcDrawer :show="isCarrySpotChecksDrawer" uis="hc-carry-spot-checks-target" to-id="carry-spot-checks-layout-target1" @close="onCarrySpotChecksDrawerClose">
  39. <div class="hc-carry-spot-checks-pdf">
  40. <HcPdf v-loading="pdfLoading" :src="pdfUrl" />
  41. <el-tooltip content="展开/收起 右侧目录" placement="top" :disabled="!isBubble">
  42. <div class="hc-csc-pdf-btn" @click="onCarryDataShow">
  43. <HcIcon v-show="isCarryDataShow" name="arrow-right-s" />
  44. <HcIcon v-show="!isCarryDataShow" name="arrow-left-s" />
  45. </div>
  46. </el-tooltip>
  47. </div>
  48. <div v-show="isCarryDataShow" class="hc-carry-spot-checks-data">
  49. <div class="hc-csc-switch">
  50. <HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" size="default" :round="false" @change="tabTypeChange" />
  51. </div>
  52. <div class="hc-csc-info-box">
  53. <el-scrollbar>
  54. <div class="hc-info-text-item">
  55. <div class="title">
  56. 案卷题名:
  57. </div>
  58. <div class="content">
  59. {{ fileInfo.name }}
  60. </div>
  61. </div>
  62. <div class="hc-info-text-item">
  63. <div class="title">
  64. <span>密</span>
  65. <span class="ml-7">级:</span>
  66. </div>
  67. <div class="content">
  68. {{ fileInfo.secretLevelValue }}
  69. </div>
  70. </div>
  71. <div class="hc-info-text-item">
  72. <div class="title">
  73. 保管期限:
  74. </div>
  75. <div class="content">
  76. {{ fileInfo.storageTimeValue }}
  77. </div>
  78. </div>
  79. <div class="hc-info-text-item">
  80. <div class="title">
  81. 卷内文件:
  82. </div>
  83. <div class="content">
  84. {{ fileInfo.pageNumber }}
  85. </div>
  86. </div>
  87. <div class="hc-info-text-item">
  88. <div class="title">
  89. 起止日期:
  90. </div>
  91. <div v-if="fileInfo?.endDate !== '' || fileInfo?.startDate !== null" class="content">
  92. {{ `${splitDate(fileInfo?.startDate)}~${splitDate(fileInfo?.endDate)}` }}
  93. </div>
  94. <div v-else class="content" />
  95. </div>
  96. <div class="hc-info-text-item">
  97. <div class="title">
  98. 立卷单位:
  99. </div>
  100. <div class="content">
  101. {{ fileInfo.unit }}
  102. </div>
  103. </div>
  104. </el-scrollbar>
  105. </div>
  106. <div class="hc-csc-data-box" :style="{ height: checkId ? '' : 'calc(100% - 363px)' }">
  107. <HcTable v-if="tabTypeKey === 'tab1'" :column="cscTableColumn1" :datas="cscTableData1" :loading="cscTableLoading" :is-arr-index="false">
  108. <template #name="{ row }">
  109. <div :class="row.id === checkId ? 'text-link' : 'text-hover'" @click="changePdf(row)">
  110. {{ row?.fileName }}
  111. </div>
  112. </template>
  113. </HcTable>
  114. <HcTable v-if="tabTypeKey === 'tab2'" :column="cscTableColumn2" :datas="cscTableData2" :loading="cscTableLoading" :is-index="false">
  115. <template #name="{ row }">
  116. <div :class="row.id === 2 ? 'text-link' : 'text-hover'">
  117. {{ row?.name }}
  118. </div>
  119. </template>
  120. </HcTable>
  121. <HcTable v-if="tabTypeKey === 'tab3'" :column="cscTableColumn3" :datas="cscTableData3" :loading="cscTableLoading" :is-index="false">
  122. <template #name="{ row }">
  123. <div :class="row.id === 2 ? 'text-link' : 'text-hover'">
  124. {{ row?.name }}
  125. </div>
  126. </template>
  127. </HcTable>
  128. <HcTable v-if="tabTypeKey === 'tab4'" :column="cscTableColumn4" :datas="cscTableData4" :loading="cscTableLoading" :is-index="false">
  129. <template #name="{ row }">
  130. <div class="hc-csc-associated-row" :class="row.id === 2 ? 'text-link' : 'text-hover'">
  131. <el-tag effect="dark">
  132. {{ row?.tag }}
  133. </el-tag>
  134. <span class="ml-3">{{ row?.name }}</span>
  135. </div>
  136. </template>
  137. </HcTable>
  138. <MetaTable v-if="tabTypeKey === 'tab5'" :loading="cscmetaTableLoading" :meta-data-table="cscmetaDataTabledata" :ishow-file="ishowFile" />
  139. <HcTable v-if="tabTypeKey === 'tab6'" :column="cscTableColumn5" :datas="cscTableData5" :loading="cscTableLoading" />
  140. <el-tooltip v-if="tabTypeKey === 'tab6' || tabTypeKey === 'tab5'" content="使用弹窗查看数据" placement="top" :disabled="!isBubble">
  141. <div class="hc-table-info-btn" @click="cscTableDataModalShow">
  142. <HcIcon name="airplay" />
  143. </div>
  144. </el-tooltip>
  145. </div>
  146. <div v-if="checkId" class="hc-csc-action-box">
  147. <div class="header-box">
  148. <div class="title">
  149. 抽检意见:
  150. </div>
  151. <div class="extra">
  152. <el-checkbox v-model="reform.type" class="size-xl">
  153. 需要整改
  154. </el-checkbox>
  155. </div>
  156. </div>
  157. <div class="textarea-box">
  158. <div v-if="ishowAllopinion" @click="contentClick">
  159. <el-input v-model="reform.content" type="textarea" :autosize="{ minRows: 5 }" resize="none" placeholder="请填写抽检意见" />
  160. </div>
  161. <div v-else>
  162. <el-input v-model="reform.myOpinion" type="textarea" :autosize="{ minRows: 5 }" resize="none" placeholder="请填写抽检意见" />
  163. </div>
  164. </div>
  165. <div class="btn-box">
  166. <el-button hc-btn @click="onCarrySpotChecksDrawerClose">
  167. <HcIcon name="close" />
  168. <span>取消查阅</span>
  169. </el-button>
  170. <el-button type="primary" hc-btn :loading="submitLoading" :disabled="ishowAllopinion" @click="submitOpinion">
  171. <HcIcon name="check" />
  172. <span>保存抽检意见</span>
  173. </el-button>
  174. </div>
  175. </div>
  176. <div v-if="checkId.length == 0" class="btn-box" style="text-align: center;">
  177. <el-button hc-btn @click="onCarrySpotChecksDrawerClose">
  178. <HcIcon name="close" />
  179. <span>取消查阅</span>
  180. </el-button>
  181. </div>
  182. </div>
  183. </HcDrawer>
  184. <!-- 使用弹窗查看数据 -->
  185. <HcDialog :show="cscTableDataModal" :title="cscTableDataTitle" widths="1080px" is-table :footer="false" @close="cscTableDataModalClose">
  186. <MetaTable v-if="tabTypeKey === 'tab5'" :loading="cscmetaTableLoading" :meta-data-table="cscmetaDataTabledata" :ishow-file="ishowFile" />
  187. <HcTable v-if="tabTypeKey === 'tab6'" :column="cscTableColumn51" :datas="cscTableData5" :loading="cscTableLoading" />
  188. </HcDialog>
  189. </div>
  190. </template>
  191. <script setup>
  192. import { nextTick, onActivated, onMounted, ref, watch } from 'vue'
  193. import { useAppStore } from '~src/store'
  194. import { getArrValue, getObjValue } from 'js-fast-way'
  195. import HcTree from '~src/components/tree/hc-tree.vue'
  196. import MetaTable from './components/meta-table.vue'
  197. import { getStoreValue, setStoreValue } from '~src/utils/storage'
  198. import tuningApi from '~api/archiveConfig/tuning.js'
  199. import archiveQueryApi from '~api/using/query.js'
  200. import inspectApi from '~api/transfer/inspects.js'
  201. //变量
  202. const useAppState = useAppStore()
  203. const projectId = ref(useAppState.getProjectId)
  204. const contractId = ref(useAppState.getContractId)
  205. const projectInfo = ref(useAppState.getProjectInfo)
  206. const isCollapse = ref(useAppState.getCollapse)
  207. const isBubble = ref(useAppState.getBubble)
  208. const userInfo = ref(useAppState.getUserInfo)
  209. //监听
  210. watch(() => [
  211. useAppState.getCollapse,
  212. useAppState.getBubble,
  213. ], ([Collapse, bubble]) => {
  214. isCollapse.value = Collapse
  215. isBubble.value = bubble
  216. })
  217. //渲染完成
  218. onMounted(() => {
  219. setTableColumns()
  220. })
  221. //缓存被激活时
  222. onActivated(() => {
  223. getTableData()
  224. })
  225. //树加载
  226. const treeLoading = ref(true)
  227. const treeNodeLoading = () => {
  228. treeLoading.value = false
  229. }
  230. //搜索表单
  231. const searchForm = ref({
  232. current: 1, size: 20, total: 0,
  233. })
  234. //截取日期
  235. const splitDate = (val)=>{
  236. if (val) {
  237. return val?.substring(0, 10)
  238. } else {
  239. return ''
  240. }
  241. }
  242. //树相关的变量
  243. const primaryKeyId = ref('')
  244. //自动展开缓存
  245. const treeAutoExpandKeys = ref(getStoreValue('inspectExpandKeys') || [])
  246. const projectTreeClick = ({ node, data, keys, key }) => {
  247. console.log(data)
  248. //缓存展开的节点
  249. setStoreValue('inspectExpandKeys', keys)
  250. treeAutoExpandKeys.value = keys || []
  251. searchForm.value.total = 0
  252. searchForm.value.current = 1
  253. searchForm.value.size = 20
  254. searchForm.value.nodeIds = data.id || ''
  255. getTableData()
  256. }
  257. //树菜单被点击
  258. const ElTreeMenuClick = async ({ key, node, data }) => {
  259. setStoreValue('inspectExpandKeys', keys)
  260. }
  261. //分页被点击
  262. const pageChange = ({ current, size }) => {
  263. searchForm.value.current = current
  264. searchForm.value.size = size
  265. getTableData()
  266. }
  267. //表格数据
  268. const tableRef = ref(null)
  269. const tableColumn = ref([])
  270. //设置表头
  271. const setTableColumns = () => {
  272. tableColumn.value = [
  273. { key: 'fileNumber', name: '档号', width:110 },
  274. { key: 'name', name: '案卷题名' },
  275. { key: 'storageTimeValue', name: '保管期限', width:100 },
  276. { key: 'pageN', name: '总页数', width:110 },
  277. { key:'unit', name: '立卷单位', width: 140 },
  278. { key:'remark', name: '备注', width: 110 },
  279. ]
  280. }
  281. const tableData = ref([])
  282. //获取数据
  283. const tableLoading = ref(false)
  284. const getTableData = async () => {
  285. tableLoading.value = true
  286. const { error, code, data } = await tuningApi.pageByArchive({
  287. ...searchForm.value,
  288. projectId: projectId.value,
  289. contractId: contractId.value,
  290. isArchive: 1,
  291. })
  292. tableLoading.value = false
  293. if (!error && code === 200) {
  294. tableData.value = getArrValue(data?.records)
  295. searchForm.value.total = data?.total || 0
  296. } else {
  297. tableData.value = []
  298. searchForm.value.total = 0
  299. }
  300. }
  301. //查阅案卷pdf
  302. const viewPdf = async (id) => {
  303. window.$message?.info('预览案卷需要合并pdf,需要一点时间')
  304. pdfLoading.value = true
  305. const { error, code, data, msg } = await tuningApi.printArchive({
  306. id: id,
  307. })
  308. pdfLoading.value = false
  309. if (!error && code === 200) {
  310. if (data) {
  311. return data
  312. } else {
  313. window.$message?.warning('文件不存在')
  314. }
  315. }
  316. }
  317. //行被点击
  318. const isCarrySpotChecksDrawer = ref(false)
  319. const fileInfo = ref('')
  320. const checkmetaFileId = ref('')
  321. const tableRowClick = async ({ row }) => {
  322. //console.log(row)
  323. fileInfo.value = row
  324. // cscTableData1.value=getArrValue( row['approvalFileList'])
  325. getArchiveFileListData()
  326. isCarrySpotChecksDrawer.value = true
  327. ishowAllopinion.value = true
  328. checkId.value = ''
  329. const url = await viewPdf(row.id)
  330. pdfUrl.value = url
  331. if (pdfUrl.value && pdfUrl?.value.length > 0 && isCarrySpotChecksDrawer.value) {
  332. setTimeout(() => {
  333. serReviewFile()
  334. }, 20000)
  335. }
  336. }
  337. //获取卷内文件数据
  338. const getArchiveFileListData = async ()=>{
  339. const { error, code, msg, data } = await archiveQueryApi.getArchiveFileList({
  340. id: fileInfo.value.id, //案卷id
  341. })
  342. //处理返回数据
  343. if (!error && code === 200) {
  344. fileInfo.value.pageNumber = data.pageNumber
  345. cscTableData1.value = getArrValue(data['approvalFileList'])
  346. if (cscTableData1.value.length > 0) {
  347. checkmetaFileId.value = cscTableData1.value[0].id
  348. getmetaInfo()
  349. }
  350. } else {
  351. cscTableData1.value = []
  352. }
  353. }
  354. //设置为已查阅
  355. const serReviewFile = async ()=>{
  356. const { error, code, data, msg } = await inspectApi.setreview({
  357. id: fileInfo.value.id,
  358. })
  359. }
  360. const checkId = ref('')
  361. const pdfUrl = ref('')
  362. const pdfLoading = ref(false)
  363. const changePdf = (row)=>{
  364. console.log(row, 'row')
  365. ishowFile.value = true
  366. pdfLoading.value = false
  367. pdfUrl.value = row['pdfFileUrl'] || ''
  368. checkId.value = row.id
  369. checkmetaFileId.value = row.id
  370. getmetaInfo()
  371. ishowAllopinion.value = true
  372. getopiniondata()
  373. if (pdfUrl.value && pdfUrl?.value.length > 0 && isCarrySpotChecksDrawer.value) {
  374. setTimeout(() => {
  375. serReviewFile()
  376. }, 20000)
  377. }
  378. }
  379. const opid = ref('')
  380. //获取抽检意见
  381. const getopiniondata = async ()=>{
  382. const { error, code, data, msg } = await inspectApi.getOpinion({
  383. fileId: checkId.value,
  384. })
  385. if (!error && code === 200) {
  386. console.log(data, 'data')
  387. let opiniondata = getObjValue(data)
  388. reform.value.content = opiniondata?.allOpinion
  389. reform.value.type = opiniondata?.allOpinion?.length > 0 ? true : false
  390. reform.value.myOpinion = opiniondata?.opinion
  391. opid.value = opiniondata?.id
  392. }
  393. }
  394. //保存抽检意见
  395. const submitLoading = ref(false)
  396. const submitOpinion = async ()=>{
  397. submitLoading.value = true
  398. const { error, code, data, msg } = await inspectApi.addOpinion({
  399. fileId: checkId.value,
  400. archiveId:fileInfo.value.id,
  401. // opinion:reform.value.content,
  402. opinion:reform.value.myOpinion,
  403. projectId:projectId.value,
  404. userId:userInfo.value.user_id,
  405. archiveName:fileInfo.value.name,
  406. id: opid.value || null,
  407. })
  408. submitLoading.value = false
  409. if (!error && code === 200) {
  410. window.$message.success(msg)
  411. serReviewFile()
  412. getTableData()
  413. }
  414. // addOpinion
  415. }
  416. //类型tab数据和相关处理
  417. const tabTypeKey = ref('tab1')
  418. const tabTypeTab = ref([
  419. { key:'tab1', name: '卷内文件' },
  420. { key:'tab2', name: '竣工资料' },
  421. { key:'tab3', name: '计量资料' },
  422. { key:'tab4', name: '关联资料' },
  423. { key:'tab5', name: '元数据' },
  424. { key:'tab6', name: '验签包' },
  425. ])
  426. const tabTypeChange = ({ key }) => {
  427. tabTypeKey.value = key
  428. if (key === 'tab5') {
  429. // getmetaInfo()
  430. if (ishowFile.value) {
  431. getmetaInfo()
  432. } else {
  433. getArchivesAutoView(fileInfo.value.id)
  434. }
  435. }
  436. }
  437. //获取案卷元数据信息
  438. const getArchivesAutoView = async (fileId)=>{
  439. cscmetaTableLoading.value = true
  440. const { error, code, data } = await tuningApi.getArchivesAutoView({
  441. id:fileId,
  442. })
  443. cscmetaTableLoading.value = false
  444. if (!error && code === 200) {
  445. let obj = getObjValue(data)
  446. cscmetaDataTabledata.value = [
  447. { containerName:'题名', keyValue:'', isType:3 },
  448. { containerName:'档号', keyValue:obj?.fileNumber, isType:2 },
  449. { containerName:'文件件数', keyValue:obj?.fileN, isType:2 },
  450. { containerName:'移交时间', keyValue:'', isType:2 },
  451. ]
  452. } else {
  453. cscmetaDataTabledata.value = []
  454. }
  455. }
  456. const cscTableLoading = ref(false)
  457. //卷内目录
  458. const cscTableColumn1 = [
  459. { key:'name', name: '卷内文件题名', align: 'center' },
  460. ]
  461. const cscTableData1 = ref([
  462. ])
  463. //竣工资料
  464. const cscTableColumn2 = [
  465. { key:'name', name: '竣工图资料', align: 'center' },
  466. ]
  467. const cscTableData2 = ref([
  468. // {id: 1, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'},
  469. // {id: 2, name: 'J6-3-2-Q-8-34 桥墩一般构造图(1-9).pdf'},
  470. // {id: 3, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'},
  471. // {id: 4, name: 'J6-3-2-Q-8-34 桥墩一般构造图(1-9).pdf'},
  472. // {id: 5, name: 'J6-3-2-Q-8-34 桥墩一般构造图(1-9).pdf'},
  473. // {id: 6, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'},
  474. // {id: 7, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'}
  475. ])
  476. //计量资料
  477. const cscTableColumn3 = [
  478. { key:'name', name: '计量资料', align: 'center' },
  479. ]
  480. const cscTableData3 = ref([
  481. // {id: 1, name: 'ZB2-17.pdf'},
  482. // {id: 2, name: 'ZB2-18.pdf'},
  483. // {id: 3, name: 'ZB2-19.pdf'},
  484. // {id: 4, name: 'ZB2-20.pdf'},
  485. // {id: 5, name: 'ZB2-21.pdf'},
  486. // {id: 6, name: 'ZB2-22.pdf'},
  487. // {id: 7, name: 'ZB2-23.pdf'}
  488. ])
  489. //计量资料
  490. const cscTableColumn4 = [
  491. { key:'name', name: '关联文件', align: 'center' },
  492. ]
  493. const cscTableData4 = ref([
  494. // {id: 1, name: 'xxxxxxxxxxxxxxxxxxx.pdf', tag: '开工'},
  495. // {id: 2, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '工序'},
  496. // {id: 3, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '评定'},
  497. // {id: 4, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '交工'},
  498. // {id: 5, name: '', tag: '抽检'},
  499. // {id: 6, name: '', tag: '隐蔽'}
  500. ])
  501. //验签包
  502. const cscTableColumn5 = [
  503. { key:'user', name: '签名者' },
  504. { key:'time', name: '签名时间' },
  505. { key:'val', name: '摘要' },
  506. ]
  507. const cscTableColumn51 = [
  508. { key:'user', name: '签名者', width: 300 },
  509. { key:'time', name: '签名时间', width: 200 },
  510. { key:'val', name: '摘要' },
  511. ]
  512. const cscTableData5 = ref([
  513. // {id: 1, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'},
  514. // {id: 2, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'},
  515. // {id: 3, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'},
  516. // {id: 4, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'},
  517. // {id: 5, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'},
  518. // {id: 6, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'}
  519. ])
  520. //抽检意见
  521. const reform = ref({
  522. type: false, content: '', myOpinion:'',
  523. })
  524. const ishowAllopinion = ref(true)
  525. const contentClick = ()=>{
  526. console.log(11111)
  527. ishowAllopinion.value = false
  528. }
  529. //显示右侧目录
  530. const isCarryDataShow = ref(true)
  531. const onCarryDataShow = () => {
  532. isCarryDataShow.value = !isCarryDataShow.value
  533. }
  534. //使用弹窗查看数据
  535. const cscTableDataModal = ref(false)
  536. const cscTableDataTitle = ref('')
  537. //显示弹窗
  538. const cscTableDataModalShow = () => {
  539. const key = tabTypeKey.value
  540. if (key === 'tab5') {
  541. cscTableDataTitle.value = '元数据'
  542. // getmetaInfo()
  543. if (ishowFile.value) {
  544. getmetaInfo()
  545. } else {
  546. getArchivesAutoView(fileInfo.value.id)
  547. }
  548. } else if (key === 'tab6') {
  549. cscTableDataTitle.value = '验签包'
  550. }
  551. cscTableDataModal.value = true
  552. }
  553. //关闭弹窗
  554. const cscTableDataModalClose = () => {
  555. cscTableDataModal.value = false
  556. getTableData()
  557. }
  558. //关闭抽查
  559. const onCarrySpotChecksDrawerClose = () => {
  560. isCarrySpotChecksDrawer.value = false
  561. pdfUrl.value = ''
  562. ishowFile.value = false
  563. checkmetaFileId.value = ''
  564. tabTypeKey.value = 'tab1'
  565. }
  566. //左右拖动,改变树形结构宽度
  567. const leftWidth = ref(382)
  568. const onmousedown = () => {
  569. const leftNum = isCollapse.value ? 142 : 272
  570. document.onmousemove = (ve) => {
  571. let diffVal = ve.clientX - leftNum
  572. if (diffVal >= 310 && diffVal <= 900) {
  573. leftWidth.value = diffVal
  574. }
  575. }
  576. document.onmouseup = () => {
  577. document.onmousemove = null
  578. document.onmouseup = null
  579. }
  580. }
  581. //获取元数据
  582. const cscmetaTableLoading = ref(false)
  583. const cscmetaDataTabledata = ref([])
  584. const ishowFile = ref(false)
  585. //获取元数据信息
  586. const getmetaInfo = async (fileId)=>{
  587. cscmetaTableLoading.value = true
  588. const { error, code, data } = await tuningApi.getMetadataFileByid({
  589. fileId: checkmetaFileId.value,
  590. })
  591. cscmetaTableLoading.value = false
  592. if (!error && code === 200) {
  593. cscmetaDataTabledata.value = getArrValue(data)
  594. } else {
  595. cscmetaDataTabledata.value = []
  596. }
  597. }
  598. </script>
  599. <style lang="scss" scoped>
  600. @import '~style/transfer/scoped/inspects.scss';
  601. </style>
  602. <style lang="scss">
  603. @import '~style/transfer/inspects.scss';
  604. @import '../../styles/theme/transfer/inspect.scss';
  605. </style>