inspects.vue 24 KB

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