initial-expert.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <template>
  2. <div id="submit-report-layout-target" class="hc-page-box">
  3. <hc-new-card scrollbar>
  4. <template #header>
  5. <HcNewSwitch
  6. :datas="tabData" :keys="tabKey" :round="false" style="margin-right: 24px"
  7. @change="tabChange"
  8. />
  9. <HcTooltip keys="transfer_initial_expert_btn_preview">
  10. <el-button hc-btn type="primary">
  11. <HcIcon name="file-pdf" />
  12. <span>预览</span>
  13. </el-button>
  14. </HcTooltip>
  15. </template>
  16. <template #extra>
  17. <!-- transfer_initial_expert_btn_sampling -->
  18. <el-button color="#0581fe" hc-btn @click="submitReportClick">
  19. <HcIcon name="shield-check" />
  20. <span>开始抽检</span>
  21. </el-button>
  22. <HcTooltip keys="transfer_initial_expert_btn_submit_report">
  23. <el-button color="#7f83f7" hc-btn style="color: white" @click="writingConclusionClick">
  24. <HcIcon name="git-pull-request" />
  25. <span>编写结论</span>
  26. </el-button>
  27. </HcTooltip>
  28. <HcTooltip keys="transfer_initial_expert_btn_history_report">
  29. <el-button color="#38b54a" hc-btn style="color: white" @click="onSubmitReportClick">
  30. <HcIcon name="history" />
  31. <span>查看验收报告</span>
  32. </el-button>
  33. </HcTooltip>
  34. </template>
  35. <div v-if="totalData.length > 0" v-loading="totalLoaing" class="h-screen">
  36. <div v-for="(item, index) in totalData" :key="index">
  37. <div class="hc-card-table-title">{{ item?.unitInfo }}</div>
  38. <template v-for="(item1, index1) in item?.nodeLists" :key="index1">
  39. <HcCardItem v-if="item1.list !== null" ui="h-half">
  40. <template #header>
  41. <span>{{ item1.nodeInfo }}</span>
  42. <!-- <span class="text-gray">(238卷)</span> -->
  43. </template>
  44. <div :style="`height: ${item1.list !== null ? '300px' : 'auto'};`">
  45. <HcTable
  46. ref="tableRef" :column="tableColumn" :datas="item1.list" :loading="tableLoading"
  47. is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
  48. @selection-change="tableSelection"
  49. />
  50. </div>
  51. </HcCardItem>
  52. </template>
  53. </div>
  54. </div>
  55. <div v-else class=" h-screen">
  56. <HcNoData />
  57. </div>
  58. </hc-new-card>
  59. <!-- 历史报告 -->
  60. <HcDrawer
  61. :show="isSubmitReportDrawer" to-id="submit-report-layout-target" uis="hc-submit-report-target"
  62. @close="onSubmitReportDrawerClose"
  63. >
  64. <template #header>
  65. <div class="hc-select-view w-52">
  66. <el-select v-model="pdfDate" placeholder="选择日期">
  67. <el-option label="2022年12月24日" value="2022年12月24日" />
  68. <el-option label="2022年12月25日" value="2022年12月25日" />
  69. <el-option label="2022年12月26日" value="2022年12月26日" />
  70. <el-option label="2022年12月27日" value="2022年12月27日" />
  71. </el-select>
  72. </div>
  73. <div class="hc-title-view">试验资料(含工地试验室资质证书、仪器标定证书等)</div>
  74. <div class="hc-icon-view text-hover" @click="onSubmitReportDrawerClose">
  75. <HcIcon name="close" />
  76. </div>
  77. </template>
  78. <HcPdf
  79. src="https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20221212/ce9799c7d18efc03efefd6f242439f2e.pdf"
  80. />
  81. </HcDrawer>
  82. </div>
  83. </template>
  84. <script setup>
  85. import { onMounted, ref } from 'vue'
  86. import { useRouter } from 'vue-router'
  87. import { useAppStore } from '~src/store'
  88. import initialgApi from '~api/initial/initial'
  89. import { getArrValue, getObjValue } from 'js-fast-way'
  90. //变量
  91. const router = useRouter()
  92. const useAppState = useAppStore()
  93. const projectId = ref(useAppState.getProjectId)
  94. const contractId = ref(useAppState.getContractId)
  95. const projectInfo = ref(useAppState.getProjectInfo)
  96. //渲染完成
  97. onMounted(() => {
  98. getTotalData()
  99. })
  100. //tab数据和相关处理
  101. const tabKey = ref('1')
  102. const tabData = ref([
  103. { key: '1', name: '建设单位归档资料' },
  104. { key: '2', name: '监理单位归档资料' },
  105. { key: '3', name: '施工单位归档资料' },
  106. { key: '4', name: '科研、新技术资料' },
  107. ])
  108. const tabChange = (item) => {
  109. tabKey.value = item?.key
  110. getTotalData()
  111. }
  112. const totalData = ref([])
  113. const totalLoaing = ref(false)
  114. const getTotalData = async ()=>{
  115. totalLoaing.value = true
  116. const { error, code, data } = await initialgApi.getUnitArchivesAutoView({
  117. projectId: projectId.value,
  118. unitType:tabKey.value,
  119. })
  120. totalLoaing.value = false
  121. if (!error && code === 200) {
  122. console.log(data, 'data')
  123. if (data !== null) {
  124. totalData.value = [data]
  125. } else {
  126. totalData.value = []
  127. }
  128. console.log(totalData.value, 'totalData.value')
  129. } else {
  130. totalData.value = []
  131. }
  132. }
  133. //------立项审批
  134. //搜索表单
  135. const searchForm = ref({
  136. current: 1, size: 20, total: 0,
  137. })
  138. //分页被点击
  139. const pageChange = ({ current, size }) => {
  140. searchForm.value.current = current
  141. searchForm.value.size = size
  142. getTableData()
  143. }
  144. //表头
  145. const tableRef = ref(null)
  146. const tableColumn = ref([
  147. { key:'fileNumber', name: '档号', width: 180 },
  148. { key:'name', name: '案卷题名' },
  149. { key:'pageN', name: '总页数', width: 120 },
  150. { key:'storageTimeValue', name: '保管期限', width: 120 },
  151. { key:'remark', name: '备注' },
  152. ])
  153. const tableData = ref([
  154. {
  155. id: 1,
  156. key1: 'FJZB-02-123',
  157. key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
  158. key3: '293',
  159. key4: '永久',
  160. key5: '备注信息',
  161. },
  162. {
  163. id: 2,
  164. key1: 'FJZB-02-123',
  165. key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
  166. key3: '293',
  167. key4: '永久',
  168. key5: '备注信息',
  169. },
  170. {
  171. id: 2,
  172. key1: 'FJZB-02-123',
  173. key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
  174. key3: '293',
  175. key4: '永久',
  176. key5: '备注信息',
  177. },
  178. ])
  179. //获取数据
  180. const tableLoading = ref(false)
  181. const getTableData = async () => {
  182. }
  183. //------勘察设计文件
  184. //搜索表单
  185. const searchFormFile = ref({
  186. current: 1, size: 20, total: 0,
  187. })
  188. //分页被点击
  189. const pageFileChange = ({ current, size }) => {
  190. searchFormFile.value.current = current
  191. searchFormFile.value.size = size
  192. getTableFileData()
  193. }
  194. //表头
  195. const tableFileRef = ref(null)
  196. const tableFileColumn = ref([
  197. { key: 'key1', name: '档号', width: 180 },
  198. { key: 'key2', name: '案卷题名' },
  199. { key: 'key3', name: '总页数', width: 120 },
  200. { key: 'key4', name: '保管期限', width: 120 },
  201. { key: 'key5', name: '备注' },
  202. ])
  203. const tableFileData = ref([
  204. {
  205. id: 1,
  206. key1: 'FJZB-02-123',
  207. key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
  208. key3: '293',
  209. key4: '永久',
  210. key5: '备注信息',
  211. },
  212. {
  213. id: 2,
  214. key1: 'FJZB-02-123',
  215. key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
  216. key3: '293',
  217. key4: '永久',
  218. key5: '备注信息',
  219. },
  220. {
  221. id: 2,
  222. key1: 'FJZB-02-123',
  223. key2: '初步设计外业验收有关文件、工程初步设计图纸、初步设计批复、初步设计审查咨询报告',
  224. key3: '293',
  225. key4: '永久',
  226. key5: '备注信息',
  227. },
  228. ])
  229. //获取数据
  230. const tableFileLoading = ref(false)
  231. const getTableFileData = async () => {
  232. }
  233. //编写结论
  234. const writingConclusionClick = () => {
  235. router.push({
  236. name: 'transfer-writing-conclusion',
  237. })
  238. }
  239. //开始抽检
  240. const submitReportClick = () => {
  241. router.push({
  242. name: 'transfer-entry-sampling',
  243. })
  244. }
  245. //历史报告
  246. const isSubmitReportDrawer = ref(false)
  247. const onSubmitReportClick = () => {
  248. isSubmitReportDrawer.value = true
  249. }
  250. const pdfDate = ref(null)
  251. //历史报告
  252. const onSubmitReportDrawerClose = () => {
  253. isSubmitReportDrawer.value = false
  254. }
  255. </script>
  256. <style lang="scss" scoped>
  257. @import '~style/transfer/scoped/initial-expert.scss';
  258. </style>
  259. <style lang="scss">
  260. .hc-submit-report-target.el-overlay {
  261. position: absolute;
  262. margin: -24px;
  263. height: revert;
  264. background-color: transparent;
  265. .hc-drawer-box.el-drawer {
  266. --el-drawer-bg-color: transparent;
  267. .el-drawer__body {
  268. padding: 24px;
  269. overflow: hidden;
  270. .hc-card-box {
  271. padding: 10px;
  272. .el-card__header {
  273. padding: 10px;
  274. .hc-card-header-box .hc-card-header {
  275. .hc-select-view {
  276. position: absolute;
  277. z-index: 11;
  278. }
  279. .hc-title-view {
  280. font-weight: bold;
  281. font-size: 20px;
  282. text-align: center;
  283. position: relative;
  284. width: 100%;
  285. }
  286. .hc-icon-view {
  287. position: absolute;
  288. right: 0;
  289. font-size: 26px;
  290. z-index: 11;
  291. }
  292. }
  293. }
  294. .el-card__body {
  295. padding: 10px;
  296. }
  297. }
  298. }
  299. }
  300. }
  301. </style>