initial-expert.vue 11 KB

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