inspects.vue 22 KB

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