inspects.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  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 #key2="{row}">
  25. <div class="text-link" :class="row.status === 1 ? 'text-green' : 'text-blue'">{{row?.key2}}</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="https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221212/ce9799c7d18efc03efefd6f242439f2e.pdf"/>
  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">安康至来凤国家高速公路奉节至巫山(渝鄂界)段干岩洞隧道LK3+425~LK3+393初期支护钢筋网分项开工报告、检验申请批复单、质量检验报告单、记录表、试验检测记录及评定报告、中间交工证书</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">机密</div>
  60. </div>
  61. <div class="hc-info-text-item">
  62. <div class="title">保管期限:</div>
  63. <div class="content">永久</div>
  64. </div>
  65. <div class="hc-info-text-item">
  66. <div class="title">卷内文件:</div>
  67. <div class="content">9</div>
  68. </div>
  69. <div class="hc-info-text-item">
  70. <div class="title">起止日期:</div>
  71. <div class="content">2022.02.12~2023.11.02</div>
  72. </div>
  73. <div class="hc-info-text-item">
  74. <div class="title">立卷单位:</div>
  75. <div class="content">贵州路桥集团xxxxx</div>
  76. </div>
  77. </el-scrollbar>
  78. </div>
  79. <div class="hc-csc-data-box">
  80. <HcTable :column="cscTableColumn1" :datas="cscTableData1" :loading="cscTableLoading" :isIndex="false" v-if="tabTypeKey === 'tab1'">
  81. <template #name="{row}">
  82. <div :class="row.id === 2 ? 'text-link' : 'text-hover'">{{row?.name}}</div>
  83. </template>
  84. </HcTable>
  85. <HcTable :column="cscTableColumn2" :datas="cscTableData2" :loading="cscTableLoading" :isIndex="false" v-if="tabTypeKey === 'tab2'">
  86. <template #name="{row}">
  87. <div :class="row.id === 2 ? 'text-link' : 'text-hover'">{{row?.name}}</div>
  88. </template>
  89. </HcTable>
  90. <HcTable :column="cscTableColumn3" :datas="cscTableData3" :loading="cscTableLoading" :isIndex="false" v-if="tabTypeKey === 'tab3'">
  91. <template #name="{row}">
  92. <div :class="row.id === 2 ? 'text-link' : 'text-hover'">{{row?.name}}</div>
  93. </template>
  94. </HcTable>
  95. <HcTable :column="cscTableColumn4" :datas="cscTableData4" :loading="cscTableLoading" :isIndex="false" v-if="tabTypeKey === 'tab4'">
  96. <template #name="{row}">
  97. <div class="hc-csc-associated-row" :class="row.id === 2 ? 'text-link' : 'text-hover'">
  98. <el-tag effect="dark">{{row?.tag}}</el-tag>
  99. <span class="ml-3">{{row?.name}}</span>
  100. </div>
  101. </template>
  102. </HcTable>
  103. <MetaTable :loading="cscTableLoading" v-if="tabTypeKey === 'tab5'"/>
  104. <HcTable :column="cscTableColumn5" :datas="cscTableData5" :loading="cscTableLoading" v-if="tabTypeKey === 'tab6'"/>
  105. <el-tooltip content="使用弹窗查看数据" placement="top" :disabled="!isBubble" v-if="tabTypeKey === 'tab6' || tabTypeKey === 'tab5'">
  106. <div class="hc-table-info-btn" @click="cscTableDataModalShow">
  107. <HcIcon name="airplay"/>
  108. </div>
  109. </el-tooltip>
  110. </div>
  111. <div class="hc-csc-action-box">
  112. <div class="header-box">
  113. <div class="title">抽检意见:</div>
  114. <div class="extra">
  115. <el-checkbox class="size-xl" v-model="reform.type">需要整改</el-checkbox>
  116. </div>
  117. </div>
  118. <div class="textarea-box">
  119. <el-input v-model="reform.content" type="textarea" :autosize="{ minRows: 5}" resize="none" placeholder="请填写抽检意见"/>
  120. </div>
  121. <div class="btn-box">
  122. <el-button hc-btn @click="onCarrySpotChecksDrawerClose">
  123. <HcIcon name="close"/>
  124. <span>取消查阅</span>
  125. </el-button>
  126. <el-button type="primary" hc-btn>
  127. <HcIcon name="check"/>
  128. <span>保存抽检意见</span>
  129. </el-button>
  130. </div>
  131. </div>
  132. </div>
  133. </HcDrawer>
  134. <!--使用弹窗查看数据-->
  135. <HcDialog :show="cscTableDataModal" :title="cscTableDataTitle" widths="1080px" isTable :footer="false" @close="cscTableDataModalClose">
  136. <MetaTable :loading="cscTableLoading" v-if="tabTypeKey === 'tab5'"/>
  137. <HcTable :column="cscTableColumn51" :datas="cscTableData5" :loading="cscTableLoading" v-if="tabTypeKey === 'tab6'"/>
  138. </HcDialog>
  139. </div>
  140. </template>
  141. <script setup>
  142. import {ref, watch, onMounted, nextTick} from "vue";
  143. import {useAppStore} from "~src/store";
  144. //import HcTree from "./components/hc-tree.vue"
  145. import HcTree from "~src/components/tree/hc-tree.vue"
  146. import MetaTable from "./components/meta-table.vue"
  147. import {getStoreValue, setStoreValue} from '~src/utils/storage'
  148. //变量
  149. const useAppState = useAppStore()
  150. const projectId = ref(useAppState.getProjectId);
  151. const contractId = ref(useAppState.getContractId);
  152. const projectInfo = ref(useAppState.getProjectInfo);
  153. const isCollapse = ref(useAppState.getCollapse)
  154. const isBubble = ref(useAppState.getBubble);
  155. //监听
  156. watch(() => [
  157. useAppState.getCollapse,
  158. useAppState.getBubble,
  159. ], ([Collapse, bubble]) => {
  160. isCollapse.value = Collapse
  161. isBubble.value = bubble
  162. })
  163. //渲染完成
  164. onMounted(() => {
  165. })
  166. //树加载
  167. const treeLoading = ref(true)
  168. const treeNodeLoading = () => {
  169. treeLoading.value = false
  170. }
  171. //搜索表单
  172. const searchForm = ref({
  173. current: 1, size: 20, total: 0
  174. })
  175. //树相关的变量
  176. const primaryKeyId = ref('')
  177. //自动展开缓存
  178. const treeAutoExpandKeys = ref(getStoreValue('inspectExpandKeys') || [])
  179. const projectTreeClick = ({node, data, keys, key}) => {
  180. console.log(data)
  181. //缓存展开的节点
  182. setStoreValue('inspectExpandKeys', keys)
  183. treeAutoExpandKeys.value = keys || []
  184. }
  185. //树菜单被点击
  186. const ElTreeMenuClick = async ({key,node,data}) => {
  187. setStoreValue('inspectExpandKeys', keys)
  188. }
  189. //分页被点击
  190. const pageChange = ({current, size}) => {
  191. searchForm.value.current = current
  192. searchForm.value.size = size
  193. getTableData()
  194. }
  195. //表格数据
  196. const tableRef = ref(null)
  197. const tableColumn = ref([
  198. {key:'key1', name: '档号', width: 100},
  199. {key:'key2', name: '案卷题名'},
  200. {key:'key3', name: '保管期限', width: 120},
  201. {key:'key4', name: '总页数', width: 120},
  202. {key:'key5', name: '立卷单位', width: 150},
  203. {key:'key6', name: '备注', width: 150}
  204. ])
  205. const tableData = ref([
  206. {
  207. id: 1,
  208. key1:'BS28',
  209. key2: '安康至来凤国家高速公路奉节至巫山(渝鄂界)段干岩洞隧道LK3+425~LK3+393初期支护钢筋网分项开工报告、检验申请批复单、质量检验报告单、记录表、试验检测记录及评定报告、中间交工证书',
  210. key3: 30,
  211. key4: 300,
  212. key5: '贵州路桥集团',
  213. key6: '这是备注信息',
  214. status: 1
  215. },
  216. {
  217. id: 2,
  218. key1:'BS29',
  219. key2: '安康至来凤国家高速公路奉节至巫山(渝鄂界)段干岩洞隧道LK3+425~LK3+393初期支护钢筋网分项开工报告、检验申请批复单、质量检验报告单、记录表、试验检测记录及评定报告、中间交工证书',
  220. key3: '永久',
  221. key4: 300,
  222. key5: '贵州路桥集团',
  223. key6: '这是备注信息',
  224. status: 0
  225. },
  226. {
  227. id: 3,
  228. key1:'BS30',
  229. key2: '安康至来凤国家高速公路奉节至巫山(渝鄂界)段干岩洞隧道LK3+425~LK3+393初期支护钢筋网分项开工报告、检验申请批复单、质量检验报告单、记录表、试验检测记录及评定报告、中间交工证书',
  230. key3: 30,
  231. key4: 300,
  232. key5: '贵州路桥集团',
  233. key6: '这是备注信息',
  234. status: 0
  235. },
  236. ])
  237. //获取数据
  238. const tableLoading = ref(false)
  239. const getTableData = async () => {
  240. }
  241. //行被点击
  242. const isCarrySpotChecksDrawer = ref(false)
  243. const tableRowClick = ({row}) => {
  244. //console.log(row)
  245. isCarrySpotChecksDrawer.value = true
  246. }
  247. //类型tab数据和相关处理
  248. const tabTypeKey = ref('tab1')
  249. const tabTypeTab = ref([
  250. {key:'tab1', name: '卷内文件'},
  251. {key:'tab2', name: '竣工资料'},
  252. {key:'tab3', name: '计量资料'},
  253. {key:'tab4', name: '关联资料'},
  254. {key:'tab5', name: '元数据'},
  255. {key:'tab6', name: '验签包'},
  256. ]);
  257. const tabTypeChange = ({key}) => {
  258. tabTypeKey.value = key
  259. }
  260. const cscTableLoading = ref(false)
  261. //卷内目录
  262. const cscTableColumn1 = [
  263. {key:'name', name: '卷内文件题名', align: 'center'}
  264. ];
  265. const cscTableData1 = ref([
  266. {id: 1, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
  267. {id: 2, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
  268. {id: 3, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
  269. {id: 4, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
  270. {id: 5, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
  271. {id: 6, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'},
  272. {id: 7, name: '[K8+450阳光大桥第x联(跨)墩顶负弯矩张拉压浆].PDF'}
  273. ])
  274. //竣工资料
  275. const cscTableColumn2 = [
  276. {key:'name', name: '竣工图资料', align: 'center'}
  277. ];
  278. const cscTableData2 = ref([
  279. {id: 1, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'},
  280. {id: 2, name: 'J6-3-2-Q-8-34 桥墩一般构造图(1-9).pdf'},
  281. {id: 3, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'},
  282. {id: 4, name: 'J6-3-2-Q-8-34 桥墩一般构造图(1-9).pdf'},
  283. {id: 5, name: 'J6-3-2-Q-8-34 桥墩一般构造图(1-9).pdf'},
  284. {id: 6, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'},
  285. {id: 7, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'}
  286. ])
  287. //计量资料
  288. const cscTableColumn3 = [
  289. {key:'name', name: '计量资料', align: 'center'}
  290. ];
  291. const cscTableData3 = ref([
  292. {id: 1, name: 'ZB2-17.pdf'},
  293. {id: 2, name: 'ZB2-18.pdf'},
  294. {id: 3, name: 'ZB2-19.pdf'},
  295. {id: 4, name: 'ZB2-20.pdf'},
  296. {id: 5, name: 'ZB2-21.pdf'},
  297. {id: 6, name: 'ZB2-22.pdf'},
  298. {id: 7, name: 'ZB2-23.pdf'}
  299. ])
  300. //计量资料
  301. const cscTableColumn4 = [
  302. {key:'name', name: '关联文件', align: 'center'}
  303. ];
  304. const cscTableData4 = ref([
  305. {id: 1, name: 'xxxxxxxxxxxxxxxxxxx.pdf', tag: '开工'},
  306. {id: 2, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '工序'},
  307. {id: 3, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '评定'},
  308. {id: 4, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '交工'},
  309. {id: 5, name: '', tag: '抽检'},
  310. {id: 6, name: '', tag: '隐蔽'}
  311. ])
  312. //验签包
  313. const cscTableColumn5 = [
  314. {key:'user', name: '签名者'},
  315. {key:'time', name: '签名时间'},
  316. {key:'val', name: '摘要'},
  317. ];
  318. const cscTableColumn51 = [
  319. {key:'user', name: '签名者', width: 300},
  320. {key:'time', name: '签名时间', width: 200},
  321. {key:'val', name: '摘要'},
  322. ];
  323. const cscTableData5 = ref([
  324. {id: 1, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'},
  325. {id: 2, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'},
  326. {id: 3, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'},
  327. {id: 4, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'},
  328. {id: 5, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'},
  329. {id: 6, user: '051@王海军@0422431197502148151@1', time: '2022-05-13 08:54:15', val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'}
  330. ])
  331. //抽检意见
  332. const reform = ref({
  333. type: false, content: ''
  334. })
  335. //显示右侧目录
  336. const isCarryDataShow = ref(true)
  337. const onCarryDataShow = () => {
  338. isCarryDataShow.value = !isCarryDataShow.value
  339. }
  340. //使用弹窗查看数据
  341. const cscTableDataModal = ref(false)
  342. const cscTableDataTitle = ref('')
  343. //显示弹窗
  344. const cscTableDataModalShow = () => {
  345. const key = tabTypeKey.value;
  346. if (key === 'tab5') {
  347. cscTableDataTitle.value = '元数据'
  348. } else if (key === 'tab6') {
  349. cscTableDataTitle.value = '验签包'
  350. }
  351. cscTableDataModal.value = true
  352. }
  353. //关闭弹窗
  354. const cscTableDataModalClose = () => {
  355. cscTableDataModal.value = false
  356. }
  357. //关闭抽查
  358. const onCarrySpotChecksDrawerClose = () => {
  359. isCarrySpotChecksDrawer.value = false
  360. }
  361. //左右拖动,改变树形结构宽度
  362. const leftWidth = ref(382);
  363. const onmousedown = () => {
  364. const leftNum = isCollapse.value ? 142 : 272
  365. document.onmousemove = (ve) => {
  366. let diffVal = ve.clientX - leftNum;
  367. if(diffVal >= 310 && diffVal <= 900) {
  368. leftWidth.value = diffVal;
  369. }
  370. }
  371. document.onmouseup = () => {
  372. document.onmousemove = null;
  373. document.onmouseup = null;
  374. }
  375. }
  376. </script>
  377. <style lang="scss" scoped>
  378. @import '~style/transfer/scoped/inspects.scss';
  379. </style>
  380. <style lang="scss">
  381. @import '~style/transfer/inspects.scss';
  382. </style>